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]];
|
this[errorProps[idx]] = tmp[errorProps[idx]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Error.captureStackTrace) {
|
||||||
|
Error.captureStackTrace(this, Exception);
|
||||||
|
}
|
||||||
|
|
||||||
if (loc) {
|
if (loc) {
|
||||||
this.lineNumber = line;
|
this.lineNumber = line;
|
||||||
this.column = column;
|
this.column = column;
|
||||||
|
|||||||
Reference in New Issue
Block a user