Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Auge2015-04-22 13:56:39 +0000
committerRaymond Auge2015-04-22 13:57:16 +0000
commit44878b3a529bb067939e98b0fe6b6d3686f567a7 (patch)
tree171d76750efc44beb22407348f7465b5d5360939 /bundles
parentf19f851fab55320a0344ecc6a88a23c3c90bed3a (diff)
downloadrt.equinox.bundles-44878b3a529bb067939e98b0fe6b6d3686f567a7.tar.gz
rt.equinox.bundles-44878b3a529bb067939e98b0fe6b6d3686f567a7.tar.xz
rt.equinox.bundles-44878b3a529bb067939e98b0fe6b6d3686f567a7.zip
Bug 465137 - [http whiteboard] error page exception class handling issues
Signed-off-by: Raymond Auge <raymond.auge@liferay.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java34
1 files changed, 23 insertions, 11 deletions
diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java
index f28442251..a5eca068f 100644
--- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java
+++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java
@@ -72,18 +72,26 @@ public class ResponseStateHandler {
}
}
}
- catch (IOException ioe) {
- setException(ioe);
+ catch (Exception e) {
+ if (!(e instanceof IOException) &&
+ !(e instanceof RuntimeException) &&
+ !(e instanceof ServletException)) {
- if (dispatcherType != DispatcherType.REQUEST) {
- throw ioe;
+ e = new ServletException(e);
}
- }
- catch (ServletException se) {
- setException(se);
+
+ setException(e);
if (dispatcherType != DispatcherType.REQUEST) {
- throw se;
+ if (e instanceof RuntimeException) {
+ throw (RuntimeException)e;
+ }
+ else if (e instanceof IOException) {
+ throw (IOException)e;
+ }
+ else if (e instanceof ServletException) {
+ throw (ServletException)e;
+ }
}
}
finally {
@@ -163,11 +171,15 @@ public class ResponseStateHandler {
null, className, null, null, null, null, Match.EXACT, null);
if (errorDispatchTargets == null) {
- if (exception instanceof ServletException) {
+ if (exception instanceof RuntimeException) {
+ throw (RuntimeException)exception;
+ }
+ else if (exception instanceof IOException) {
+ throw (IOException)exception;
+ }
+ else if (exception instanceof ServletException) {
throw (ServletException)exception;
}
-
- throw (IOException)exception;
}
request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, exception);

Back to the top