Author: remy.maucherat(a)jboss.com
Date: 2013-04-25 11:26:37 -0400 (Thu, 25 Apr 2013)
New Revision: 2192
Modified:
branches/8.0.x/src/main/java/org/apache/catalina/core/StandardWrapperValve.java
Log:
The exception is mandatory for the error events. Make a dummy one if there's none.
Modified: branches/8.0.x/src/main/java/org/apache/catalina/core/StandardWrapperValve.java
===================================================================
---
branches/8.0.x/src/main/java/org/apache/catalina/core/StandardWrapperValve.java 2013-04-18
02:40:28 UTC (rev 2191)
+++
branches/8.0.x/src/main/java/org/apache/catalina/core/StandardWrapperValve.java 2013-04-25
15:26:37 UTC (rev 2192)
@@ -543,11 +543,15 @@
try {
// Call error notifications for IO listeners
if (error) {
+ Throwable throwable = asyncContext.getError();
+ if (throwable == null) {
+ throwable = new Exception();
+ }
if (request.getReadListener() != null) {
- request.getReadListener().onError(asyncContext.getError());
+ request.getReadListener().onError(throwable);
}
if (response.getWriteListener() != null) {
-
response.getWriteListener().onError(asyncContext.getError());
+ response.getWriteListener().onError(throwable);
}
}
} catch (Throwable e) {
Show replies by date