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.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/handlebars/exception.js b/lib/handlebars/exception.js
index 053aea8..46ce18e 100644
--- a/lib/handlebars/exception.js
+++ b/lib/handlebars/exception.js
@@ -1,8 +1,8 @@
-var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
+const errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
function Exception(message, node) {
- var loc = node && node.loc,
+ let loc = node && node.loc,
line,
column;
if (loc) {
@@ -12,10 +12,10 @@ function Exception(message, node) {
message += ' - ' + line + ':' + column;
}
- var tmp = Error.prototype.constructor.call(this, message);
+ let tmp = Error.prototype.constructor.call(this, message);
// Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.
- for (var idx = 0; idx < errorProps.length; idx++) {
+ for (let idx = 0; idx < errorProps.length; idx++) {
this[errorProps[idx]] = tmp[errorProps[idx]];
}