Author: mpodolin
Date: 2010-03-25 09:03:25 -0400 (Thu, 25 Mar 2010)
New Revision: 2366
Modified:
portal/branches/EPP_5_0_Branch/component/pc/src/main/java/org/exoplatform/services/portletcontainer/PortletContainerException.java
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
Log:
JBEPP-239: GTNPORTAL-897 and GTNPORTAL-931 ported to the EPP branch
Modified:
portal/branches/EPP_5_0_Branch/component/pc/src/main/java/org/exoplatform/services/portletcontainer/PortletContainerException.java
===================================================================
---
portal/branches/EPP_5_0_Branch/component/pc/src/main/java/org/exoplatform/services/portletcontainer/PortletContainerException.java 2010-03-25
12:10:07 UTC (rev 2365)
+++
portal/branches/EPP_5_0_Branch/component/pc/src/main/java/org/exoplatform/services/portletcontainer/PortletContainerException.java 2010-03-25
13:03:25 UTC (rev 2366)
@@ -32,8 +32,6 @@
public PortletContainerException(final Throwable cause)
{
super(cause);
- if (cause != null)
- cause.printStackTrace();
}
/**
@@ -51,8 +49,6 @@
public PortletContainerException(final String message, final Throwable cause)
{
super(message, cause);
- if (cause != null)
- cause.printStackTrace();
}
}
Modified:
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
===================================================================
---
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2010-03-25
12:10:07 UTC (rev 2365)
+++
portal/branches/EPP_5_0_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2010-03-25
13:03:25 UTC (rev 2366)
@@ -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)
{
Show replies by date