public Response handleException ( final JaxRsRequest theRequest , final Throwable theException ) throws IOException { if ( theException instanceof JaxRsResponseException ) { return new JaxRsExceptionInterceptor ( ) . convertExceptionIntoResponse ( theRequest , ( JaxRsResponseException ) theException ) ; } else { return new JaxRsExceptionInterceptor ( ) . convertExceptionIntoResponse ( theRequest , new JaxRsExceptionInterceptor ( ) . convertException ( this , theException ) ) ; } }
Convert an exception to a response