Author: reto
Date: Thu Jan 28 12:54:31 2010
New Revision: 904070
URL: http://svn.apache.org/viewvc?rev=904070&view=rev
Log:
Avoiding ClassCastException casting throwable to Exception
Modified:
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/JaxRsHandler.java
Modified:
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/JaxRsHandler.java
URL:
http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/JaxRsHandler.java?rev=904070&r1=904069&r2=904070&view=diff
==============================================================================
---
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/JaxRsHandler.java
(original)
+++
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/JaxRsHandler.java
Thu Jan 28 12:54:31 2010
@@ -477,7 +477,7 @@
}
} catch (ResourceMethodException ex) {
- Exception cause = (Exception) ex.getCause();
+ Throwable cause = ex.getCause();
if (cause == null) { // This should not happen
logger.error("Exception {}", ex);
} else {
@@ -500,7 +500,7 @@
}
}
- static void handleException(Exception exception, WebRequest request,
Response response) throws HandlerException, RuntimeException {
+ static void handleException(Throwable exception, WebRequest request,
Response response) throws HandlerException, RuntimeException {
if (exception instanceof WebApplicationException) {
WebApplicationException webEx =
(WebApplicationException) exception;
logger.debug("Exception {}", webEx);