You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Alejandro Ramirez (JIRA)" <be...@incubator.apache.org> on 2005/05/05 23:49:09 UTC
[jira] Closed: (BEEHIVE-492) Global.app is no longer handling exceptions
[ http://issues.apache.org/jira/browse/BEEHIVE-492?page=all ]
Alejandro Ramirez closed BEEHIVE-492:
-------------------------------------
Verified Fixed. Executed a test where Global app catches an exception thrown by a JPF (with no SharedFlow references). Global app successfully caught the exception.
> Global.app is no longer handling exceptions
> -------------------------------------------
>
> Key: BEEHIVE-492
> URL: http://issues.apache.org/jira/browse/BEEHIVE-492
> Project: Beehive
> Type: Bug
> Components: NetUI
> Versions: V1
> Reporter: Alejandro Ramirez
> Assignee: Alejandro Ramirez
> Fix For: V1
> Attachments: sharedFlowExceptions.zip
>
> 1.- Unzip the attached pageflow into a beehive enabled webapp.
> 2.- Compile and deploy the webapp and access the attached pageflow (e.g. http://localhost:<yourport>/<yourWebAppContext>/sharedFlowExceptions/SharedFlowController.jpf
> This pageflow should display start.jsp which contains several links to throw exceptions.
> 3.- Click on the link labeled " Throw a java.lang.Exception This should be caught by global app".
> Expected: A java.lang.Exception should be thrown by the action in SharedFlowController.jpf:
> @Jpf.Action()
> protected Forward throwJavaLangException()
> throws Exception
> {
> throw new java.lang.Exception( "java.lang.Exception thrown!" );
> }
> That exception should be handled by Global.app, since it has been declared as follows:
> @Jpf.Controller(
> catches={
> @Jpf.Catch(type=java.lang.Exception.class, method="handleException")
> }
> )
> public class Global extends GlobalApp
> {
> @Jpf.ExceptionHandler(
> forwards={
> @Jpf.Forward(name="errorPage", path="/sharedFlowExceptions/sharedFlowError.jsp")
> }
> )
> protected Forward handleException(Exception ex, String actionName, String message, Object form)
> {
> System.err.print("[" + getRequest().getContextPath() + "] ");
> System.err.println("Unhandled exception caught in Global.app:");
> ex.printStackTrace();
> return new Forward("errorPage");
> }
> }
> ACTUAL: The exception is not handled by Global.app (the user is not redirected to /sharedFlowExceptions/sharedFlowError.jsp
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira