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() {