mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Include load error in notification of unknown node
This commit is contained in:
parent
29e903e1c8
commit
8761e61439
@ -545,7 +545,7 @@
|
||||
"nodeDisabled": "Node disabled:",
|
||||
"nodeDisabled_plural": "Nodes disabled:",
|
||||
"nodeUpgraded": "Node module __module__ upgraded to version __version__",
|
||||
"unknownNodeRegistered": "Unrecognised node type registered: <ul><li>__type__</li></ul>"
|
||||
"unknownNodeRegistered": "Error loading node: <ul><li>__type__<br>__error__</li></ul>"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Manage palette",
|
||||
|
@ -144,8 +144,17 @@ RED.nodes = (function() {
|
||||
registerNodeType: function(nt,def) {
|
||||
if (nt.substring(0,8) != "subflow:") {
|
||||
if (!nodeSets[typeToId[nt]]) {
|
||||
var fullType = (RED._loadingModule?("["+RED._loadingModule+"] "):"")+nt
|
||||
RED.notify(RED._("palette.event.unknownNodeRegistered",{type:fullType}), "error");
|
||||
var error = "";
|
||||
var fullType = nt;
|
||||
if (RED._loadingModule) {
|
||||
fullType = "["+RED._loadingModule+"] "+nt;
|
||||
if (nodeSets[RED._loadingModule]) {
|
||||
error = nodeSets[RED._loadingModule].err || "";
|
||||
} else {
|
||||
error = "Unknown error";
|
||||
}
|
||||
}
|
||||
RED.notify(RED._("palette.event.unknownNodeRegistered",{type:fullType, error:error}), "error");
|
||||
return;
|
||||
}
|
||||
def.set = nodeSets[typeToId[nt]];
|
||||
|
Loading…
Reference in New Issue
Block a user