diff options
-rw-r--r-- | lib/handlebars/base.js | 2 | ||||
-rw-r--r-- | spec/partials.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js index 67fcc20..cf3084e 100644 --- a/lib/handlebars/base.js +++ b/lib/handlebars/base.js @@ -51,7 +51,7 @@ HandlebarsEnvironment.prototype = { extend(this.partials, name); } else { if (typeof partial === 'undefined') { - throw new Exception('Attempting to register a partial as undefined'); + throw new Exception(`Attempting to register a partial called "${name}" as undefined`); } this.partials[name] = partial; } diff --git a/spec/partials.js b/spec/partials.js index cc2c266..d3ead74 100644 --- a/spec/partials.js +++ b/spec/partials.js @@ -103,7 +103,7 @@ describe('partials', function() { shouldThrow(function() { var undef; handlebarsEnv.registerPartial('undefined_test', undef); - }, Handlebars.Exception, 'Attempting to register a partial as undefined'); + }, Handlebars.Exception, 'Attempting to register a partial called "undefined_test" as undefined'); }); it('rendering template partial in vm mode throws an exception', function() { |