[ http://issues.apache.org/jira/browse/BEEHIVE-492?page=history ]
     
Rich Feit resolved BEEHIVE-492:
-------------------------------

    Resolution: Fixed

Fixed with revision 161160.

There was definitely a bug here -- glad you caught it.  Global.app was not 
handling exceptions.  This repro case will still "fail", though, since 
Global.app intentionally doesn't apply when there are Shared Flow references in 
the page flow.  It's the same story as with actions: you can only use the 
(deprecated) Global.app in a page flow if the page flow doesn't take advantage 
of Shared Flows (which replace Global.app).

> 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: Rich Feit
>      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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira

Reply via email to