mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Switch RED.events.DEBUG messages to warn to get stacktraces
This commit is contained in:
parent
0e454b08c8
commit
0541d9189d
@ -36,15 +36,15 @@
|
|||||||
var evt = arguments[0]
|
var evt = arguments[0]
|
||||||
var args = Array.prototype.slice.call(arguments,1);
|
var args = Array.prototype.slice.call(arguments,1);
|
||||||
if (RED.events.DEBUG) {
|
if (RED.events.DEBUG) {
|
||||||
console.log(evt,args);
|
console.warn(evt,args);
|
||||||
}
|
}
|
||||||
if (handlers[evt]) {
|
if (handlers[evt]) {
|
||||||
for (var i=0;i<handlers[evt].length;i++) {
|
for (var i=0;i<handlers[evt].length;i++) {
|
||||||
try {
|
try {
|
||||||
handlers[evt][i].apply(null, args);
|
handlers[evt][i].apply(null, args);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log("RED.events.emit error: ["+evt+"] "+(err.toString()));
|
console.warn("RED.events.emit error: ["+evt+"] "+(err.toString()));
|
||||||
console.log(err);
|
console.warn(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user