summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-05-29 10:57:48 -0400
committerkpdecker <kpdecker@gmail.com>2013-05-29 10:57:48 -0400
commit293672432b3912a1d1f6b659a7e08334532f56d5 (patch)
tree1db7712af3ab2a449de9d899ee6d572595ec62e3
parentda2aabe7bdc75e29178d920332fad9de183de8a0 (diff)
downloadhandlebars.js-293672432b3912a1d1f6b659a7e08334532f56d5.zip
handlebars.js-293672432b3912a1d1f6b659a7e08334532f56d5.tar.gz
handlebars.js-293672432b3912a1d1f6b659a7e08334532f56d5.tar.bz2
improve error message on missing helper
Via @stefanpenner Fixes #523
-rw-r--r--dist/handlebars.js2
-rw-r--r--dist/handlebars.runtime.js2
-rw-r--r--lib/handlebars/base.js2
-rw-r--r--spec/qunit_spec.js2
4 files changed, 4 insertions, 4 deletions
diff --git a/dist/handlebars.js b/dist/handlebars.js
index da556dd..5139dc8 100644
--- a/dist/handlebars.js
+++ b/dist/handlebars.js
@@ -67,7 +67,7 @@ Handlebars.registerHelper('helperMissing', function(arg) {
if(arguments.length === 2) {
return undefined;
} else {
- throw new Error("Could not find property '" + arg + "'");
+ throw new Error("Missing helper: '" + arg + "'");
}
});
diff --git a/dist/handlebars.runtime.js b/dist/handlebars.runtime.js
index 8744aa7..ac2b020 100644
--- a/dist/handlebars.runtime.js
+++ b/dist/handlebars.runtime.js
@@ -67,7 +67,7 @@ Handlebars.registerHelper('helperMissing', function(arg) {
if(arguments.length === 2) {
return undefined;
} else {
- throw new Error("Could not find property '" + arg + "'");
+ throw new Error("Missing helper: '" + arg + "'");
}
});
diff --git a/lib/handlebars/base.js b/lib/handlebars/base.js
index 0a9b18c..d7284b0 100644
--- a/lib/handlebars/base.js
+++ b/lib/handlebars/base.js
@@ -44,7 +44,7 @@ Handlebars.registerHelper('helperMissing', function(arg) {
if(arguments.length === 2) {
return undefined;
} else {
- throw new Error("Could not find property '" + arg + "'");
+ throw new Error("Missing helper: '" + arg + "'");
}
});
diff --git a/spec/qunit_spec.js b/spec/qunit_spec.js
index 933c8ed..6a093f3 100644
--- a/spec/qunit_spec.js
+++ b/spec/qunit_spec.js
@@ -706,7 +706,7 @@ test("if a context is not found, helperMissing is used", function() {
shouldThrow(function() {
var template = CompilerContext.compile("{{hello}} {{link_to world}}");
template({});
- }, [Error, "Could not find property 'link_to'"], "Should throw exception");
+ }, [Error, "Missing helper: 'link_to'"], "Should throw exception");
});
test("if a context is not found, custom helperMissing is used", function() {