mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Merge c25ada8dcb98315924745801fac7bea6acd645ec into 56a4530ec65f7004e2ae05ff4ef06fd4017035d0
This commit is contained in:
commit
aacdfdb48d
@ -41,6 +41,7 @@
|
||||
"cors": "2.8.5",
|
||||
"cronosjs": "1.7.1",
|
||||
"denque": "2.1.0",
|
||||
"detect-mocha": "^0.1.0",
|
||||
"express": "4.21.1",
|
||||
"express-session": "1.18.1",
|
||||
"form-data": "4.0.0",
|
||||
|
@ -21,6 +21,7 @@ const flowUtil = require("./util");
|
||||
const context = require('../nodes/context');
|
||||
const hooks = require("@node-red/util").hooks;
|
||||
const credentials = require("../nodes/credentials");
|
||||
const detectMocha = require("detect-mocha");
|
||||
|
||||
let Subflow;
|
||||
let Log;
|
||||
@ -804,6 +805,9 @@ function deliverMessageToDestination(sendEvent) {
|
||||
} catch(err) {
|
||||
Log.error(`Error delivering message to node:${sendEvent.destination.node._path} [${sendEvent.destination.node.type}]`)
|
||||
Log.error(err.stack)
|
||||
if (detectMocha()) {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ var redUtil = require("@node-red/util").util;
|
||||
var Log = require("@node-red/util").log;
|
||||
var context = require("./context");
|
||||
var flows = require("../flows");
|
||||
var detectMocha = require("detect-mocha");
|
||||
const hooks = require("@node-red/util").hooks;
|
||||
|
||||
|
||||
@ -218,6 +219,9 @@ Node.prototype._emitInput = function(arg) {
|
||||
);
|
||||
} catch(err) {
|
||||
node.error(err,arg);
|
||||
if (detectMocha()) {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
} else if (node._inputCallbacks) {
|
||||
// Multiple callbacks registered. Call each one, tracking eventual completion
|
||||
|
Loading…
x
Reference in New Issue
Block a user