Revision: 16485
          http://sourceforge.net/p/gate/code/16485
Author:   ian_roberts
Date:     2013-01-23 15:19:39 +0000 (Wed, 23 Jan 2013)
Log Message:
-----------
More informative error message when calling setParameterValue with a String
value for a non-String property that is not declared to be a CREOLE parameter.

Modified Paths:
--------------
    gate/trunk/src/gate/creole/AbstractResource.java

Modified: gate/trunk/src/gate/creole/AbstractResource.java
===================================================================
--- gate/trunk/src/gate/creole/AbstractResource.java    2013-01-23 02:48:39 UTC 
(rev 16484)
+++ gate/trunk/src/gate/creole/AbstractResource.java    2013-01-23 15:19:39 UTC 
(rev 16485)
@@ -208,10 +208,14 @@
                     throw new ResourceInstantiationException(pe);
                   }
                 }else{
-                  //this should never happen
-                  throw new LuckyException("Unknown parameter " + 
paramaterName +
-                          " for resource " + resource.getClass().getName() +
-                          "!");
+                  // if this happens it means that the class has the specified 
parameter
+                  // name does indeed correspond to a getter/setter pair on 
the class
+                  // but there is no associated CREOLE metadata for that 
parameter name
+                  throw new ResourceInstantiationException("Property " + 
paramaterName +
+                      " of resource class " + resource.getClass().getName() +
+                      " is not declared as a CREOLE parameter.  Automatic" +
+                      " conversion of string values to other types is only" +
+                      " supported for declared parameters."); 
                 }
               }else{
                 throw new ResourceInstantiationException(

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to