Title: [waffle-scm] [826] trunk/waffle-core/src/main/java/org/codehaus/waffle/action: Moved exception message text to class invoking exception, so it can be localised.

Diff

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinder.java (825 => 826)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinder.java	2008-09-10 11:12:50 UTC (rev 825)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/action/AbstractMethodDefinitionFinder.java	2008-09-10 11:43:51 UTC (rev 826)
@@ -126,7 +126,7 @@
             throw new AmbiguousActionSignatureMethodException("Method: '" + methodName + "' for controller: '"
                     + controller.getClass() + "'");
         } else if (methodDefinitions.isEmpty()) {
-            throw new NoMatchingActionMethodException(methodName, controller.getClass());
+            throw new NoMatchingActionMethodException("No matching methods for "+methodName, controller.getClass());
         }
 
         MethodDefinition methodDefinition = methodDefinitions.get(0);
@@ -192,7 +192,7 @@
             throw new AmbiguousActionSignatureMethodException("Method: " + methodName);
         } else if (methodDefinitions.isEmpty()) {
             // TODO - avoid null
-            throw new NoMatchingActionMethodException(methods.get(0).getName(), null);
+            throw new NoMatchingActionMethodException("No matching methods for "+methods.get(0).getName(), null);
         }
 
         return methodDefinitions.get(0); // TODO ... should we cache the method?

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/action/AbstractOgnlMethodDefinitionFinder.java (825 => 826)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/action/AbstractOgnlMethodDefinitionFinder.java	2008-09-10 11:12:50 UTC (rev 825)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/action/AbstractOgnlMethodDefinitionFinder.java	2008-09-10 11:43:51 UTC (rev 826)
@@ -38,7 +38,7 @@
     protected List<Method> findMethods(Class<?> type, String methodName) {
         List<Method> methods = getMethods(type, methodName, false);
         if (methods == null) {
-            throw new NoMatchingActionMethodException(methodName, type);
+            throw new NoMatchingActionMethodException("No matching methods for "+methodName, type);
         }
         return methods;
     }

Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/action/NoMatchingActionMethodException.java (825 => 826)

--- trunk/waffle-core/src/main/java/org/codehaus/waffle/action/NoMatchingActionMethodException.java	2008-09-10 11:12:50 UTC (rev 825)
+++ trunk/waffle-core/src/main/java/org/codehaus/waffle/action/NoMatchingActionMethodException.java	2008-09-10 11:43:51 UTC (rev 826)
@@ -14,7 +14,7 @@
     private final Class<?> actionClass;
 
     public NoMatchingActionMethodException(String methodName, Class<?> actionClass) {
-        super("no matching methods for: " + methodName);
+        super(methodName);
         this.methodName = methodName;
         this.actionClass = actionClass;
     }


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to