[gatein-commits] gatein SVN: r2336 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application.

do-not-reply at jboss.org do-not-reply at jboss.org
Mon Mar 22 05:12:57 EDT 2010


Author: julien_viet
Date: 2010-03-22 05:12:57 -0400 (Mon, 22 Mar 2010)
New Revision: 2336

Modified:
   portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
Log:
GTNPORTAL-931 : Incorrect exception handling thrown by a Portlet render invocation in portlet edition in layout edition


Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java	2010-03-22 09:05:56 UTC (rev 2335)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java	2010-03-22 09:12:57 UTC (rev 2336)
@@ -221,6 +221,7 @@
          {
             PortletContainerException pcException;
 
+            //
             if (portletResponse instanceof ErrorResponse)
             {
                ErrorResponse errorResponse = (ErrorResponse)portletResponse;
@@ -233,17 +234,24 @@
                      + "]. Expected a FragmentResponse or an ErrorResponse");
             }
 
-            PortletExceptionHandleService portletExceptionService =
-               (PortletExceptionHandleService)uiPortlet_.getApplicationComponent(PortletExceptionHandleService.class);
-            portletExceptionService.handle(pcException);
+            //
+            PortletExceptionHandleService portletExceptionService = uiPortlet_.getApplicationComponent(PortletExceptionHandleService.class);
+            if (portletExceptionService != null)
+            {
+                portletExceptionService.handle(pcException);
+            }
+            else
+            {
+               log.warn("Could not find the PortletExceptionHandleService in the exo container");
+            }
 
+            //
+            log.error("Portlet render in edit mode threw an exception", pcException);
             content = "An error has occured. Please see the logs for details.";
          }
 
          portletContent.setLength(0);
          portletContent.append(content);
-         //
-
       }
       catch (Throwable ex)
       {



More information about the gatein-commits mailing list