Skip to content

Commit

Permalink
fixed undefined Error.captureStackTrace
Browse files Browse the repository at this point in the history
  • Loading branch information
matej21 committed Feb 27, 2015
1 parent 90c95f4 commit 477e9b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ function NeonError(message, line, column) {
this.line = line;
this.column = column;
this.constructor.prototype.__proto__ = Error.prototype;
Error.captureStackTrace(this, this.constructor);
if (typeof Error.captureStackTrace !== "undefined") {
Error.captureStackTrace(this, this.constructor);
}
}
module.exports = NeonError;

0 comments on commit 477e9b9

Please sign in to comment.