[jboss-cvs] jboss-seam/src/main/org/jboss/seam/core ...

Gavin King gavin.king at jboss.com
Mon Nov 20 23:50:47 EST 2006


  User: gavin   
  Date: 06/11/20 23:50:47

  Modified:    src/main/org/jboss/seam/core  Exceptions.java
  Log:
  exception was not being propagated across redirect to debug page
  
  Revision  Changes    Path
  1.14      +5 -2      jboss-seam/src/main/org/jboss/seam/core/Exceptions.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Exceptions.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Exceptions.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- Exceptions.java	17 Nov 2006 02:35:45 -0000	1.13
  +++ Exceptions.java	21 Nov 2006 04:50:47 -0000	1.14
  @@ -24,6 +24,7 @@
   import org.jboss.seam.annotations.Redirect;
   import org.jboss.seam.annotations.Render;
   import org.jboss.seam.annotations.Scope;
  +import org.jboss.seam.contexts.Context;
   import org.jboss.seam.contexts.Contexts;
   import org.jboss.seam.contexts.Lifecycle;
   import org.jboss.seam.interceptors.ExceptionInterceptor;
  @@ -364,14 +365,16 @@
         public Object handle(Exception e) throws Exception
         {
            log.error("redirecting to debug page", e);
  -         Contexts.getConversationContext().set("org.jboss.seam.debug.lastException", e);
  -         Contexts.getConversationContext().set("org.jboss.seam.debug.phaseId", Lifecycle.getPhaseId().toString());
  +         Context conversationContext = Contexts.getConversationContext();
  +         conversationContext.set("org.jboss.seam.debug.lastException", e);
  +         conversationContext.set("org.jboss.seam.debug.phaseId", Lifecycle.getPhaseId().toString());
            org.jboss.seam.core.Redirect redirect = org.jboss.seam.core.Redirect.instance();
            redirect.setViewId("/debug.xhtml");
            Manager manager = Manager.instance();
            manager.beforeRedirect();
            redirect.setParameter( manager.getConversationIdParameter(), manager.getCurrentConversationId() );
            redirect.execute();
  +         conversationContext.flush();
            return rethrow(e);
         }
   
  
  
  



More information about the jboss-cvs-commits mailing list