From 27bf72372ecaadeee410b95e957f56b725cbe206 Mon Sep 17 00:00:00 2001 From: Martin Guillon Date: Tue, 1 May 2018 14:00:05 +0200 Subject: [PATCH] fix after comments --- nodes/core/core/80-function.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nodes/core/core/80-function.js b/nodes/core/core/80-function.js index 2d5f7901a..ba52f2ff6 100644 --- a/nodes/core/core/80-function.js +++ b/nodes/core/core/80-function.js @@ -205,7 +205,7 @@ module.exports = function(RED) { var context = vm.createContext(sandbox); try { 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 columnOffset: 0, // column number offset to be used for stack traces displayErrors: true @@ -227,7 +227,6 @@ module.exports = function(RED) { //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