Update of /var/cvs/src/org/mmbase/module/core
In directory james.mmbase.org:/tmp/cvs-serv28950

Modified Files:
        MMObjectBuilder.java 
Log Message:
  MMB-1208


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/module/core
See also: http://www.mmbase.org/jira/browse/MMB-1208


Index: MMObjectBuilder.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/module/core/MMObjectBuilder.java,v
retrieving revision 1.431
retrieving revision 1.432
diff -u -b -r1.431 -r1.432
--- MMObjectBuilder.java        3 Sep 2008 15:25:17 -0000       1.431
+++ MMObjectBuilder.java        22 Sep 2008 17:18:29 -0000      1.432
@@ -62,7 +62,7 @@
  * @author Rob van Maris
  * @author Michiel Meeuwissen
  * @author Ernst Bunders
- * @version $Id: MMObjectBuilder.java,v 1.431 2008/09/03 15:25:17 michiel Exp $
+ * @version $Id: MMObjectBuilder.java,v 1.432 2008/09/22 17:18:29 michiel Exp $
  */
 public class MMObjectBuilder extends MMTable implements NodeEventListener, 
RelationEventListener {
 
@@ -1718,7 +1718,12 @@
             return function.getFunctionValueWithList(parameters);
         } else {
             // fallback
-            return executeFunction(node, functionName, parameters);
+            Object fv = executeFunction(node, functionName, parameters);
+            if (fv == null && MMBase.getMMBase().inDevelopment()) {
+                throw new IllegalArgumentException("You cannot use 
non-existing function '" + functionName + "' of node '" + getNumber() + "'");
+            } else {
+                return null;
+            }
         }
     }
 
@@ -1759,7 +1764,7 @@
      */
     protected Function newFunctionInstance(String name, Parameter[] 
parameters, ReturnType returnType) {
         return new NodeFunction<Object>(name, parameters, returnType) {
-                public Object getFunctionValue(Node node, Parameters 
parameters) {
+            @Override public Object getFunctionValue(Node node, Parameters 
parameters) {
                     return 
MMObjectBuilder.this.executeFunction(getCoreNode(MMObjectBuilder.this, node),
                                                                 name,
                                                                 
parameters.subList(0, parameters.size() - 1) // removes the node-argument, some 
legacy impl. get confused
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to