diff --git a/lib/handlebars/vm.js b/lib/handlebars/vm.js
index <HASH>..<HASH> 100644
--- a/lib/handlebars/vm.js
+++ b/lib/handlebars/vm.js
@@ -615,7 +615,9 @@ Handlebars.VM = {
     return new Handlebars.JavaScriptCompiler().compile(environment);
   },
   invokePartial: function(partial, name, context, helpers, partials) {
-    if(partial instanceof Function) {
+    if(partial === undefined) {
+      throw new Handlebars.Exception("The partial " + name + " could not be found");
+    } else if(partial instanceof Function) {
       return partial(context, helpers, partials);
     } else {
       partials[name] = Handlebars.VM.compile(partial);
If the partial is not found, an exception should be thrown