Class ExceptionHandler


  • public class ExceptionHandler
    extends java.lang.Object
    Version:
    $Revision: 1 $
    • Field Detail

      • unwrappedExceptions

        protected java.util.Set<java.lang.String> unwrappedExceptions
      • mapperExecuted

        protected boolean mapperExecuted
    • Constructor Detail

      • ExceptionHandler

        public ExceptionHandler​(ResteasyProviderFactory providerFactory,
                                java.util.Set<java.lang.String> unwrappedExceptions)
    • Method Detail

      • isMapperExecuted

        public boolean isMapperExecuted()
      • executeExactExceptionMapper

        public javax.ws.rs.core.Response executeExactExceptionMapper​(java.lang.Throwable exception)
        If there exists an Exception mapper for exception, execute it, otherwise, do NOT recurse up class hierarchy of exception.
        Parameters:
        exception -
        Returns:
      • executeExceptionMapperForClass

        public javax.ws.rs.core.Response executeExceptionMapperForClass​(java.lang.Throwable exception,
                                                                        java.lang.Class clazz)
      • executeExceptionMapper

        public javax.ws.rs.core.Response executeExceptionMapper​(java.lang.Throwable exception)
        Execute an ExceptionMapper if one exists for the given exception. Recurse to base class if not found
        Parameters:
        exception -
        Returns:
        true if an ExceptionMapper was found and executed
      • unwrapException

        protected javax.ws.rs.core.Response unwrapException​(HttpRequest request,
                                                            java.lang.Throwable e)
      • handleFailure

        protected javax.ws.rs.core.Response handleFailure​(HttpRequest request,
                                                          Failure failure)
      • handleWebApplicationException

        protected javax.ws.rs.core.Response handleWebApplicationException​(javax.ws.rs.WebApplicationException wae)
      • handleException

        public javax.ws.rs.core.Response handleException​(HttpRequest request,
                                                         java.lang.Throwable e)