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/02/06 07:36:25 UTC
cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade ServletHandler.java
costin 01/02/05 22:36:25
Modified: src/facade22/org/apache/tomcat/facade ServletHandler.java
Log:
Coresponding changes in ServletHandler - the exceptions are propagated
from included servlets ( instead of wrapping them )
Revision Changes Path
1.13 +11 -4 jakarta-tomcat/src/facade22/org/apache/tomcat/facade/ServletHandler.java
Index: ServletHandler.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/ServletHandler.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ServletHandler.java 2001/01/20 23:25:44 1.12
+++ ServletHandler.java 2001/02/06 06:36:25 1.13
@@ -427,7 +427,9 @@
}
// Overrides the default handler
- public void service ( Request req, Response res ) {
+ public void service ( Request req, Response res )
+ throws Exception
+ {
if( state!=STATE_READY ) {
if( state!= STATE_DISABLED ) {
init();
@@ -497,8 +499,8 @@
} else {
servlet.service(reqF, resF);
}
- // catch just UnavailableException, so we can set a timer if needed
- // other exceptions will be thrown
+ // catch just UnavailableException, so we can set a timer if needed
+ // other exceptions will be thrown
} catch ( UnavailableException ex ) {
// if new exception, save and set timer if necessary
if ( res.getErrorException() != ex ) {
@@ -524,6 +526,7 @@
handleServiceError( req, res, ex );
return;
}
+
// clear any error exception since none were thrown
res.setErrorException(null);
res.setErrorURI(null);
@@ -566,9 +569,13 @@
}
protected void handleServiceError( Request req, Response res, Throwable t )
+ throws Exception
{
// if in included, defer handling to higher level
- if (res.isIncluded()) return;
+ if (res.isIncluded()) {
+ throw (Exception)t;
+ }
+ // only for top-level servlets
handleError( req, res, t );
}