Use captureStackTrace for error handler

Provides more stable error stack reporting when running under v8 environments.
This commit is contained in:
kpdecker
2015-04-14 01:14:18 -05:00
parent 54e743a09a
commit a009a97a2e
+4
View File
@@ -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;