Use captureStackTrace for error handler
Provides more stable error stack reporting when running under v8 environments.
This commit is contained in:
@@ -19,6 +19,10 @@ function Exception(message, node) {
|
||||
this[errorProps[idx]] = tmp[errorProps[idx]];
|
||||
}
|
||||
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(this, Exception);
|
||||
}
|
||||
|
||||
if (loc) {
|
||||
this.lineNumber = line;
|
||||
this.column = column;
|
||||
|
||||
Reference in New Issue
Block a user