You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2013/07/20 01:09:37 UTC

[3/4] git commit: Throw an Error when an initialize function can not be found

Throw an Error when an initialize function can not be found


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/8ae691c5
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/8ae691c5
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/8ae691c5

Branch: refs/heads/master
Commit: 8ae691c543e6a241a8b55ede45e6f0eb7c4b627f
Parents: 0acc96d
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Jul 19 16:00:39 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Jul 19 16:00:39 2013 -0700

----------------------------------------------------------------------
 .../main/coffeescript/META-INF/modules/t5/core/pageinit.coffee    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/8ae691c5/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
index f01fa23..bf42856 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/t5/core/pageinit.coffee
@@ -96,6 +96,9 @@ define ["underscore", "./console", "./dom", "./events"],
 
         fn = if functionName? then moduleLib[functionName] else moduleLib
 
+        unless fn?
+          throw new Error "Could not locate function `#{qualifiedName}'."
+
         if console.debugEnabled
           argsString = _.map(initArguments, JSON.stringify).join(", ")
           console.debug "Invoking #{qualifiedName}(#{argsString})"