summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Christian <mark@slack-corp.com>2015-10-19 09:44:53 -0700
committerMark Christian <mark@slack-corp.com>2015-10-19 09:44:53 -0700
commit33b53ef9893938ac2d38b78f548d8bc13642215c (patch)
tree376d85eb7e46244b12ecc671fb2d25288efaeade
parentf08d48764da42dc71875c9381af4bb056804b06a (diff)
downloadhandlebars.js-33b53ef9893938ac2d38b78f548d8bc13642215c.zip
handlebars.js-33b53ef9893938ac2d38b78f548d8bc13642215c.tar.gz
handlebars.js-33b53ef9893938ac2d38b78f548d8bc13642215c.tar.bz2
Use template string :sparkles: for error message and double-quotes for quoting partial name
-rw-r--r--lib/handlebars/base.js2
-rw-r--r--spec/partials.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js
index def1d3e..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 called `' + name + '` 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 839157e..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 called `undefined_test` 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() {