mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix after comments
This commit is contained in:
parent
5967f4b0d4
commit
27bf72372e
@ -205,7 +205,7 @@ module.exports = function(RED) {
|
|||||||
var context = vm.createContext(sandbox);
|
var context = vm.createContext(sandbox);
|
||||||
try {
|
try {
|
||||||
this.script = vm.createScript(functionText, {
|
this.script = vm.createScript(functionText, {
|
||||||
filename: this.name + '_' + this.id, // filename for stack traces
|
filename: 'Function Node:'+this.id+(this.name?' ['+this.name+']':'', // filename for stack traces
|
||||||
lineOffset: -11, // line number offset to be used for stack traces
|
lineOffset: -11, // line number offset to be used for stack traces
|
||||||
columnOffset: 0, // column number offset to be used for stack traces
|
columnOffset: 0, // column number offset to be used for stack traces
|
||||||
displayErrors: true
|
displayErrors: true
|
||||||
@ -227,7 +227,6 @@ module.exports = function(RED) {
|
|||||||
//remove unwanted part
|
//remove unwanted part
|
||||||
const index = err.stack.search(/\n\s*at ContextifyScript.Script.runInContext/);
|
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');
|
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/);
|
const stack = err.stack.split(/\r?\n/);
|
||||||
|
|
||||||
//store the error in msg to be used in flows
|
//store the error in msg to be used in flows
|
||||||
|
Loading…
Reference in New Issue
Block a user