Skip to content

Commit

Permalink
Merge pull request #266 from Pyro699/error_context
Browse files Browse the repository at this point in the history
More details from parsing Error
  • Loading branch information
zaach committed Aug 18, 2015
2 parents 97a2bfa + ecf8ae2 commit 6e8c665
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/jison.js
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,13 @@ function parseError (str, hash) {
if (hash.recoverable) {
this.trace(str);
} else {
throw new Error(str);
function _parseError (msg, hash) {
this.message = msg;
this.hash = hash;
}
_parseError.prototype = new Error();

throw new _parseError(str, hash);
}
}

Expand Down

0 comments on commit 6e8c665

Please sign in to comment.