You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mf...@apache.org on 2009/06/12 22:30:18 UTC

svn commit: r784259 - /myfaces/portlet-bridge/core/trunk_2.0.x/api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java

Author: mfreedman
Date: Fri Jun 12 20:30:18 2009
New Revision: 784259

URL: http://svn.apache.org/viewvc?rev=784259&view=rev
Log:
Improved exception message when ridge class not found.

Modified:
    myfaces/portlet-bridge/core/trunk_2.0.x/api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java

Modified: myfaces/portlet-bridge/core/trunk_2.0.x/api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk_2.0.x/api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java?rev=784259&r1=784258&r2=784259&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk_2.0.x/api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java (original)
+++ myfaces/portlet-bridge/core/trunk_2.0.x/api/src/main/java/javax/portlet/faces/GenericFacesPortlet.java Fri Jun 12 20:30:18 2009
@@ -145,14 +145,12 @@
         mFacesBridgeClass = (Class<? extends Bridge>) loader.loadClass(bridgeClassName);
       } catch (ClassNotFoundException cnfe)
       {
-        // Do nothing and fall through to null check
+        throw new PortletException("Unable to load configured bridge class: " + bridgeClassName);
       }
     }
-
-    if (mFacesBridgeClass == null)
+    else
     {
-      throw new PortletException("Configuration Error: Initial Parameter '" + BRIDGE_CLASS + 
-                                 "' is not defined for portlet: " + getPortletName());
+      throw new PortletException("Can't locate configuration parameter defining the bridge class to use for this portlet:" + getPortletName());
     }
 
     // Get the other bridge configuration parameters and set as context attributes