You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/01/07 01:08:59 UTC

cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade RequestDispatcherImpl.java

costin      01/01/06 16:08:59

  Modified:    src/facade22/org/apache/tomcat/facade
                        RequestDispatcherImpl.java
  Log:
  Bug: RuntimeException should be propagated to the caller ( previous behavior: it was
  wrapped in a ServletException )
  
  Bug: the included exception was lost ( ServletException(String) instead of
  ( String, Throwable ).
  
  Revision  Changes    Path
  1.9       +5 -1      jakarta-tomcat/src/facade22/org/apache/tomcat/facade/RequestDispatcherImpl.java
  
  Index: RequestDispatcherImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/RequestDispatcherImpl.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RequestDispatcherImpl.java	2000/12/26 22:58:50	1.8
  +++ RequestDispatcherImpl.java	2001/01/07 00:08:59	1.9
  @@ -201,6 +201,8 @@
   	    Exception ex = realResponse.getErrorException();
   	    if ( ex instanceof IOException )
   		throw (IOException) ex;
  +	    if ( ex instanceof RuntimeException )
  +		throw (RuntimeException) ex;
   	    else if ( ex instanceof ServletException )
   		throw (ServletException) ex;
   	    else
  @@ -363,11 +365,13 @@
   	    Exception ex = realResponse.getErrorException();
   	    if ( ex instanceof IOException )
   		throw (IOException) ex;
  +	    if ( ex instanceof RuntimeException )
  +		throw (RuntimeException) ex;	
   	    else if ( ex instanceof ServletException )
   		throw (ServletException) ex;
   	    else
   		throw new ServletException
  -		    (sm.getString("dispatcher.includeException", ex));
  +		    (sm.getString("dispatcher.includeException"), ex);
   	}
       }