Author: reto
Date: Tue May  4 16:10:36 2010
New Revision: 940928

URL: http://svn.apache.org/viewvc?rev=940928&view=rev
Log:
rethrowing wrapped WebApplicationException

Modified:
    
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/RootResourceExecutorImpl.java

Modified: 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/RootResourceExecutorImpl.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/RootResourceExecutorImpl.java?rev=940928&r1=940927&r2=940928&view=diff
==============================================================================
--- 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/RootResourceExecutorImpl.java
 (original)
+++ 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.triaxrs/org.apache.clerezza.triaxrs/src/main/java/org/apache/clerezza/triaxrs/RootResourceExecutorImpl.java
 Tue May  4 16:10:36 2010
@@ -545,10 +545,14 @@ public class RootResourceExecutorImpl im
                        logger.error("Exception {}", ex);
                        throw new WebApplicationException(500);
                } catch (InvocationTargetException ex) {
-                       logger.error("Exception {}", ex);
-                       if (ex.getCause() instanceof AccessControlException) {
-                               throw (AccessControlException) ex.getCause();
+                       final Throwable cause = ex.getCause();
+                       if (cause instanceof AccessControlException) {
+                               throw (AccessControlException) cause;
+                       }
+                       if (cause instanceof WebApplicationException) {
+                               throw (WebApplicationException) cause;
                        }
+                       logger.error("Exception {}", ex);
                        throw new WebApplicationException(500);
                }
        }


Reply via email to