summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/exception.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/exception.js')
-rw-r--r--lib/handlebars/exception.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/handlebars/exception.js b/lib/handlebars/exception.js
index 3fde1c1..053aea8 100644
--- a/lib/handlebars/exception.js
+++ b/lib/handlebars/exception.js
@@ -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;