struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r410185 - /struts/action/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java
Date Tue, 30 May 2006 04:39:03 GMT
Author: niallp
Date: Mon May 29 21:39:02 2006
New Revision: 410185

URL: http://svn.apache.org/viewvc?rev=410185&view=rev
Log:
Improve error handling when action mapping is not found

Modified:
    struts/action/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java

Modified: struts/action/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java
URL: http://svn.apache.org/viewvc/struts/action/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java?rev=410185&r1=410184&r2=410185&view=diff
==============================================================================
--- struts/action/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java
(original)
+++ struts/action/trunk/faces/src/main/java/org/apache/struts/faces/renderer/FormRenderer.java
Mon May 29 21:39:02 2006
@@ -111,6 +111,10 @@
         String action = form.getAction();
         ModuleConfig moduleConfig = form.lookupModuleConfig(context);
         ActionConfig actionConfig = moduleConfig.findActionConfig(action);
+        if (actionConfig == null) {
+            throw new IllegalArgumentException("Cannot find action '" +
+                                               action + "' configuration");
+        }
         String beanName = actionConfig.getAttribute();
         if (beanName != null) {
             form.getAttributes().put("beanName", beanName);



Mime
View raw message