diff options
author | tomhuda <tomhuda@strobecorp.com> | 2011-07-07 23:09:33 -0700 |
---|---|---|
committer | tomhuda <tomhuda@strobecorp.com> | 2011-07-07 23:09:33 -0700 |
commit | 059a80661d132b43abf0a314ccaad32d9172d7f0 (patch) | |
tree | 52d5cf5d5871cdea6a5910368cf580b3c437bf6d /lib/handlebars/utils.js | |
parent | 37e36bf1371f458212db7ee45a18ed163cd329fb (diff) | |
download | handlebars.js-059a80661d132b43abf0a314ccaad32d9172d7f0.zip handlebars.js-059a80661d132b43abf0a314ccaad32d9172d7f0.tar.gz handlebars.js-059a80661d132b43abf0a314ccaad32d9172d7f0.tar.bz2 |
* Remove legacy support for inverse sections as additional parameters.
* Unify inverse and normal block helpers
* Make Handlebars.Exception inherit from JS Error
Diffstat (limited to 'lib/handlebars/utils.js')
-rw-r--r-- | lib/handlebars/utils.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/handlebars/utils.js b/lib/handlebars/utils.js index 4202c77..b814b66 100644 --- a/lib/handlebars/utils.js +++ b/lib/handlebars/utils.js @@ -2,8 +2,13 @@ var Handlebars = require("handlebars"); // BEGIN(BROWSER) Handlebars.Exception = function(message) { - this.message = message; + var tmp = Error.prototype.constructor.apply(this, arguments); + + for (var p in tmp) { + if (tmp.hasOwnProperty(p)) { this[p] = tmp[p]; } + } }; +Handlebars.Exception.prototype = new Error; // Build out our basic SafeString type Handlebars.SafeString = function(string) { |