diff --git a/lib/jison.js b/lib/jison.js index b47f80a49..d078056ee 100755 --- a/lib/jison.js +++ b/lib/jison.js @@ -1359,13 +1359,9 @@ function parseError (str, hash) { if (hash.recoverable) { this.trace(str); } else { - function _parseError (msg, hash) { - this.message = msg; - this.hash = hash; - } - _parseError.prototype = Error; - - throw new _parseError(str, hash); + var error = new Error(str); + error.hash = hash; + throw error; } }