public JaxRsResponseException convertException ( final AbstractJaxRsProvider theServer , final Throwable theException ) { if ( theServer . withStackTrace ( ) ) { exceptionHandler . setReturnStackTracesForExceptionTypes ( Throwable . class ) ; } final JaxRsRequest requestDetails = theServer . getRequest ( null , null ) . build ( ) ; final BaseServerResponseException convertedException = preprocessException ( theException , requestDetails ) ; return new JaxRsResponseException ( convertedException ) ; }
This method convert an exception to a JaxRsResponseException