From 06d45286cdcc4dc842c65614b7fce2cba7e9bbc5 Mon Sep 17 00:00:00 2001 From: MariasStory Date: Mon, 12 Dec 2016 22:32:47 +0100 Subject: [PATCH] Parsing error details. Report details of the parsing error. Related to the https://github.com/mishoo/UglifyJS2/issues/348. --- lib/parse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/parse.js b/lib/parse.js index ec82d47d..464a8f31 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -195,7 +195,7 @@ function JS_Parse_Error(message, filename, line, col, pos) { this.line = line; this.col = col; this.pos = pos; - this.stack = new Error().stack; + this.stack = new Error(this.message + " (filename: " + this.filename + ", line: " + this.line + ", col: " + this.col + ", pos: " + this.pos + ")" + "\n\n").stack; }; JS_Parse_Error.prototype.toString = function() {