mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix error stack
This commit is contained in:
parent
20f03c356c
commit
5967f4b0d4
@ -224,7 +224,15 @@ module.exports = function(RED) {
|
|||||||
this.status({fill:"yellow",shape:"dot",text:""+converted});
|
this.status({fill:"yellow",shape:"dot",text:""+converted});
|
||||||
}
|
}
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
|
//remove unwanted part
|
||||||
|
const index = err.stack.search(/\n\s*at ContextifyScript.Script.runInContext/);
|
||||||
|
err.stack = err.stack.slice(0, index).split('\n').slice(0,-1).join('\n');
|
||||||
|
console.log(index, err.stack);
|
||||||
|
const stack = err.stack.split(/\r?\n/);
|
||||||
|
|
||||||
|
//store the error in msg to be used in flows
|
||||||
msg.error = err;
|
msg.error = err;
|
||||||
|
|
||||||
var line = 0;
|
var line = 0;
|
||||||
var errorMessage;
|
var errorMessage;
|
||||||
var stack = err.stack.split(/\r?\n/);
|
var stack = err.stack.split(/\r?\n/);
|
||||||
|
Loading…
Reference in New Issue
Block a user