diff options
author | kpdecker <kpdecker@gmail.com> | 2013-10-01 20:52:14 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2013-10-01 21:14:18 -0500 |
commit | 6a23391a9a72e263248f6ffa2535cfae67a2b135 (patch) | |
tree | b197bd07134aa2f38a33af4d3e6f9736892bd0e9 /lib/handlebars/utils.js | |
parent | 80b748ad3e34b29249af134e214d57fec92e22a4 (diff) | |
download | handlebars.js-6a23391a9a72e263248f6ffa2535cfae67a2b135.zip handlebars.js-6a23391a9a72e263248f6ffa2535cfae67a2b135.tar.gz handlebars.js-6a23391a9a72e263248f6ffa2535cfae67a2b135.tar.bz2 |
Break exception class out into a standalone module
Diffstat (limited to 'lib/handlebars/utils.js')
-rw-r--r-- | lib/handlebars/utils.js | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/handlebars/utils.js b/lib/handlebars/utils.js index 458c46d..e3c2160 100644 --- a/lib/handlebars/utils.js +++ b/lib/handlebars/utils.js @@ -1,19 +1,6 @@ var toString = Object.prototype.toString, isArray = Array.isArray; -var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - -export function Exception(message) { - var tmp = Error.prototype.constructor.apply(this, arguments); - - // 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++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } -}; - -Exception.prototype = new Error(); - // Build out our basic SafeString type export function SafeString(string) { this.string = string; |