Author: woonsan
Date: Wed Mar 31 17:51:48 2010
New Revision: 929639
URL: http://svn.apache.org/viewvc?rev=929639&view=rev
Log:
JS2-1129: Adding the detailed message of the root exception cause on unexpected
errors in the sso portlets.
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/sso/SSOIFramePortlet.java
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/sso/SSOWebContentPortlet.java
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/sso/SSOIFramePortlet.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/sso/SSOIFramePortlet.java?rev=929639&r1=929638&r2=929639&view=diff
==============================================================================
---
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/sso/SSOIFramePortlet.java
(original)
+++
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/sso/SSOIFramePortlet.java
Wed Mar 31 17:51:48 2010
@@ -200,9 +200,14 @@ public class SSOIFramePortlet extends IF
}
}
catch (SSOException e)
- {
- PortletMessaging.publish(request, "SSOIFrame", "status", new
StatusMessage("Could not add remote user: portal principal "+
request.getUserPrincipal().getName() +
- " is already associated with a remote user for this
site!", StatusMessage.ERROR));
+ {
+ String errorMessage = "Failed to add remote user for the portal
principal, " + request.getUserPrincipal().getName() + ".";
+ if (e.getCause() != null)
+ {
+ errorMessage += " (" + e.getCause() + ")";
+ }
+ StatusMessage statusMessage = new StatusMessage(errorMessage,
StatusMessage.ERROR);
+ PortletMessaging.publish(request, "SSOIFrame", "status",
statusMessage);
actionResponse.setPortletMode(PortletMode.EDIT); // stay on edit
}
Modified:
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/sso/SSOWebContentPortlet.java
URL:
http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/sso/SSOWebContentPortlet.java?rev=929639&r1=929638&r2=929639&view=diff
==============================================================================
---
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/sso/SSOWebContentPortlet.java
(original)
+++
portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/sso/SSOWebContentPortlet.java
Wed Mar 31 17:51:48 2010
@@ -217,8 +217,13 @@ public class SSOWebContentPortlet extend
}
catch (SSOException e)
{
- PortletMessaging.publish(actionRequest, "SSOWebContent",
"status", new StatusMessage("Could not add remote user: portal principal "+
actionRequest.getUserPrincipal().getName() +
- " is already associated with a remote user for this
site!", StatusMessage.ERROR));
+ String errorMessage = "Failed to add remote user for the
portal principal, " + actionRequest.getUserPrincipal().getName() + ".";
+ if (e.getCause() != null)
+ {
+ errorMessage += " (" + e.getCause() + ")";
+ }
+ StatusMessage statusMessage = new StatusMessage(errorMessage,
StatusMessage.ERROR);
+ PortletMessaging.publish(actionRequest, "SSOWebContent",
"status", statusMessage);
actionResponse.setPortletMode(PortletMode.EDIT); // stay on
edit
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]