Author: markt
Date: Mon Sep 27 22:12:05 2010
New Revision: 1001932
URL: http://svn.apache.org/viewvc?rev=1001932&view=rev
Log:
Partial fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=48644
Some Throwables must always be re-thrown
Modified:
tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Mon Sep 27
22:12:05 2010
@@ -34,6 +34,7 @@ import org.apache.coyote.OutputBuffer;
import org.apache.coyote.Request;
import org.apache.coyote.RequestInfo;
import org.apache.coyote.Response;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.jni.Socket;
@@ -409,6 +410,7 @@ public class AjpAprProcessor implements
error = true;
break;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.debug(sm.getString("ajpprocessor.header.error"), t);
// 400 - Bad Request
response.setStatus(400);
@@ -421,6 +423,7 @@ public class AjpAprProcessor implements
try {
prepareRequest();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.debug(sm.getString("ajpprocessor.request.prepare"), t);
// 400 - Internal Server Error
response.setStatus(400);
@@ -436,6 +439,7 @@ public class AjpAprProcessor implements
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("ajpprocessor.request.process"), t);
// 500 - Internal Server Error
response.setStatus(500);
@@ -453,6 +457,7 @@ public class AjpAprProcessor implements
try {
finish();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
error = true;
}
}
@@ -498,6 +503,7 @@ public class AjpAprProcessor implements
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"), t);
// 500 - Internal Server Error
response.setStatus(500);
Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java Mon Sep 27
22:12:05 2010
@@ -36,6 +36,7 @@ import org.apache.coyote.Adapter;
import org.apache.coyote.ProtocolHandler;
import org.apache.coyote.RequestGroupInfo;
import org.apache.coyote.RequestInfo;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
@@ -420,6 +421,7 @@ public class AjpAprProtocol
// rare-but-nonfatal exceptions, catch them here, and log as
// above.
catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
@@ -456,6 +458,7 @@ public class AjpAprProtocol
// rare-but-nonfatal exceptions, catch them here, and log as
// above.
catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Mon Sep 27
22:12:05 2010
@@ -36,6 +36,7 @@ import org.apache.coyote.OutputBuffer;
import org.apache.coyote.Request;
import org.apache.coyote.RequestInfo;
import org.apache.coyote.Response;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteChunk;
@@ -418,6 +419,7 @@ public class AjpProcessor implements Act
error = true;
break;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.debug(sm.getString("ajpprocessor.header.error"), t);
// 400 - Bad Request
response.setStatus(400);
@@ -430,6 +432,7 @@ public class AjpProcessor implements Act
try {
prepareRequest();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.debug(sm.getString("ajpprocessor.request.prepare"), t);
// 400 - Internal Server Error
response.setStatus(400);
@@ -445,6 +448,7 @@ public class AjpProcessor implements Act
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("ajpprocessor.request.process"), t);
// 500 - Internal Server Error
response.setStatus(500);
@@ -462,6 +466,7 @@ public class AjpProcessor implements Act
try {
finish();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
error = true;
}
}
@@ -499,6 +504,7 @@ public class AjpProcessor implements Act
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"), t);
// 500 - Internal Server Error
response.setStatus(500);
Modified: tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/ajp/AjpProtocol.java Mon Sep 27
22:12:05 2010
@@ -37,6 +37,7 @@ import org.apache.coyote.Adapter;
import org.apache.coyote.ProtocolHandler;
import org.apache.coyote.RequestGroupInfo;
import org.apache.coyote.RequestInfo;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
@@ -416,6 +417,7 @@ public class AjpProtocol
// rare-but-nonfatal exceptions, catch them here, and log as
// above.
catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Mon
Sep 27 22:12:05 2010
@@ -39,6 +39,7 @@ import org.apache.coyote.http11.filters.
import org.apache.coyote.http11.filters.SavedRequestInputFilter;
import org.apache.coyote.http11.filters.VoidInputFilter;
import org.apache.coyote.http11.filters.VoidOutputFilter;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.Ascii;
@@ -1082,6 +1083,7 @@ public abstract class AbstractHttp11Proc
} catch (IOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.finish"), t);
// 500 - Internal Server Error
response.setStatus(500);
@@ -1093,6 +1095,7 @@ public abstract class AbstractHttp11Proc
} catch (IOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.response.finish"), t);
error = true;
}
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Mon Sep
27 22:12:05 2010
@@ -31,6 +31,7 @@ import org.apache.coyote.Request;
import org.apache.coyote.RequestInfo;
import org.apache.coyote.Response;
import org.apache.coyote.http11.filters.BufferedInputFilter;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.jni.Address;
@@ -156,6 +157,7 @@ public class Http11AprProcessor extends
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"), t);
// 500 - Internal Server Error
response.setStatus(500);
@@ -242,6 +244,7 @@ public class Http11AprProcessor extends
error = true;
break;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (log.isDebugEnabled()) {
log.debug(sm.getString("http11processor.header.parse"), t);
}
@@ -257,6 +260,7 @@ public class Http11AprProcessor extends
try {
prepareRequest();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (log.isDebugEnabled()) {
log.debug(sm.getString("http11processor.request.prepare"), t);
}
@@ -287,6 +291,7 @@ public class Http11AprProcessor extends
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"),
t);
// 500 - Internal Server Error
response.setStatus(500);
@@ -363,6 +368,7 @@ public class Http11AprProcessor extends
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"), t);
// 500 - Internal Server Error
response.setStatus(500);
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProtocol.java Mon Sep
27 22:12:05 2010
@@ -28,6 +28,7 @@ import javax.management.ObjectName;
import org.apache.coyote.RequestGroupInfo;
import org.apache.coyote.RequestInfo;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
@@ -320,6 +321,7 @@ public class Http11AprProtocol extends A
// rare-but-nonfatal exceptions, catch them here, and log
as
// above.
catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
@@ -380,6 +382,7 @@ public class Http11AprProtocol extends A
// rare-but-nonfatal exceptions, catch them here, and log as
// above.
catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
@@ -403,6 +406,7 @@ public class Http11AprProtocol extends A
// exceptions, catch them here, and log as per {...@link
#event()}
// above.
} catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Mon Sep
27 22:12:05 2010
@@ -29,6 +29,7 @@ import org.apache.coyote.Request;
import org.apache.coyote.RequestInfo;
import org.apache.coyote.Response;
import org.apache.coyote.http11.filters.BufferedInputFilter;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.Ascii;
@@ -190,6 +191,7 @@ public class Http11NioProcessor extends
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"), t);
// 500 - Internal Server Error
response.setStatus(500);
@@ -250,6 +252,7 @@ public class Http11NioProcessor extends
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"), t);
// 500 - Internal Server Error
response.setStatus(500);
@@ -344,6 +347,7 @@ public class Http11NioProcessor extends
error = true;
break;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (log.isDebugEnabled()) {
log.debug(sm.getString("http11processor.header.parse"), t);
}
@@ -359,6 +363,7 @@ public class Http11NioProcessor extends
try {
prepareRequest();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (log.isDebugEnabled()) {
log.debug(sm.getString("http11processor.request.prepare"), t);
}
@@ -403,6 +408,7 @@ public class Http11NioProcessor extends
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"),
t);
// 500 - Internal Server Error
response.setStatus(500);
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProtocol.java Mon Sep
27 22:12:05 2010
@@ -29,6 +29,7 @@ import javax.management.ObjectName;
import org.apache.coyote.RequestGroupInfo;
import org.apache.coyote.RequestInfo;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.modeler.Registry;
@@ -318,6 +319,7 @@ public class Http11NioProtocol extends A
// rare-but-nonfatal exceptions, catch them here, and log as
// above.
catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
@@ -414,6 +416,7 @@ public class Http11NioProtocol extends A
// rare-but-nonfatal exceptions, catch them here, and log as
// above.
catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Mon Sep 27
22:12:05 2010
@@ -30,6 +30,7 @@ import org.apache.coyote.Request;
import org.apache.coyote.RequestInfo;
import org.apache.coyote.Response;
import org.apache.coyote.http11.filters.BufferedInputFilter;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
import org.apache.tomcat.util.buf.ByteChunk;
@@ -171,6 +172,7 @@ public class Http11Processor extends Abs
try {
socket.getSocket().setSoTimeout(soTimeout);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.debug(sm.getString("http11processor.socket.timeout"), t);
error = true;
}
@@ -203,6 +205,7 @@ public class Http11Processor extends Abs
error = true;
break;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (log.isDebugEnabled()) {
log.debug(sm.getString("http11processor.header.parse"), t);
}
@@ -218,6 +221,7 @@ public class Http11Processor extends Abs
try {
prepareRequest();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
if (log.isDebugEnabled()) {
log.debug(sm.getString("http11processor.request.prepare"), t);
}
@@ -249,6 +253,7 @@ public class Http11Processor extends Abs
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"),
t);
// 500 - Internal Server Error
response.setStatus(500);
@@ -269,6 +274,7 @@ public class Http11Processor extends Abs
if (!isAsync())
endRequest();
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.finish"), t);
// 500 - Internal Server Error
response.setStatus(500);
@@ -278,6 +284,7 @@ public class Http11Processor extends Abs
try {
rp.setStage(org.apache.coyote.Constants.STAGE_ENDOUTPUT);
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.response.finish"), t);
error = true;
}
@@ -330,6 +337,7 @@ public class Http11Processor extends Abs
} catch (InterruptedIOException e) {
error = true;
} catch (Throwable t) {
+ ExceptionUtils.handleThrowable(t);
log.error(sm.getString("http11processor.request.process"), t);
// 500 - Internal Server Error
response.setStatus(500);
Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java?rev=1001932&r1=1001931&r2=1001932&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Protocol.java Mon Sep 27
22:12:05 2010
@@ -31,6 +31,7 @@ import javax.management.ObjectName;
import org.apache.coyote.RequestGroupInfo;
import org.apache.coyote.RequestInfo;
+import org.apache.jasper.util.ExceptionUtils;
import org.apache.juli.logging.Log;
import org.apache.tomcat.util.modeler.Registry;
import org.apache.tomcat.util.net.AbstractEndpoint.Handler.SocketState;
@@ -282,6 +283,7 @@ public class Http11Protocol extends Abst
// rare-but-nonfatal exceptions, catch them here, and log as
// above.
catch (Throwable e) {
+ ExceptionUtils.handleThrowable(e);
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]