Package org.jboss.resteasy.core

## Class ExceptionHandler

- java.lang.Object
- - org.jboss.resteasy.core.ExceptionHandler

-     public class ExceptionHandler
      extends Object

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected boolean` | `mapperExecuted` |
    `protected ResteasyProviderFactoryImpl` | `providerFactory` |
    `protected Set<String>` | `unwrappedExceptions` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ExceptionHandler​(ResteasyProviderFactory providerFactory, Set<String> unwrappedExceptions)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `javax.ws.rs.core.Response` | `executeExactExceptionMapper​(Throwable exception)` | Deprecated.
    `protected javax.ws.rs.core.Response` | `executeExactExceptionMapper​(Throwable exception, RESTEasyTracingLogger logger)` | If there exists an Exception mapper for exception, execute it, otherwise, do NOT recurse up class hierarchy of exception.
    `javax.ws.rs.core.Response` | `executeExceptionMapper​(Throwable exception)` | Deprecated.
    `protected javax.ws.rs.core.Response` | `executeExceptionMapper​(Throwable exception, RESTEasyTracingLogger logger)` | Execute an ExceptionMapper if one exists for the given exception.
    `javax.ws.rs.core.Response` | `executeExceptionMapperForClass​(Throwable exception, Class clazz)` | Deprecated.
    `protected javax.ws.rs.core.Response` | `executeExceptionMapperForClass​(Throwable exception, Class clazz, RESTEasyTracingLogger logger)` |
    `protected javax.ws.rs.core.Response` | `handleApplicationException​(HttpRequest request, ApplicationException e, RESTEasyTracingLogger logger)` |
    `protected javax.ws.rs.core.Response` | `handleClientErrorException​(HttpRequest request, javax.ws.rs.ClientErrorException e)` |
    `javax.ws.rs.core.Response` | `handleException​(HttpRequest request, Throwable e)` |
    `protected javax.ws.rs.core.Response` | `handleFailure​(HttpRequest request, Failure failure)` |
    `protected javax.ws.rs.core.Response` | `handleReaderException​(HttpRequest request, ReaderException e, RESTEasyTracingLogger logger)` |
    `protected javax.ws.rs.core.Response` | `handleWebApplicationException​(javax.ws.rs.WebApplicationException wae)` |
    `protected javax.ws.rs.core.Response` | `handleWriterException​(HttpRequest request, WriterException e, RESTEasyTracingLogger logger)` |
    `boolean` | `isMapperExecuted()` |
    `protected javax.ws.rs.core.Response` | `unwrapException​(HttpRequest request, Throwable e, RESTEasyTracingLogger logger)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### providerFactory

          protected ResteasyProviderFactoryImpl providerFactory

    - #### unwrappedExceptions

          protected Set<String> unwrappedExceptions

    - #### mapperExecuted

          protected boolean mapperExecuted

  - ### Constructor Detail

    - #### ExceptionHandler

          public ExceptionHandler​(ResteasyProviderFactory providerFactory,
                                  Set<String> unwrappedExceptions)

  - ### Method Detail

    - #### isMapperExecuted

          public boolean isMapperExecuted()

    - #### executeExactExceptionMapper

          protected javax.ws.rs.core.Response executeExactExceptionMapper​(Throwable exception,
                                                                          RESTEasyTracingLogger logger)

      If there exists an Exception mapper for exception, execute it, otherwise, do NOT recurse up class hierarchy of exception.
      Parameters:
        `exception` - exception
        `logger` - logger
      Returns:
        response response object

    - #### executeExactExceptionMapper

          @Deprecated
          public javax.ws.rs.core.Response executeExactExceptionMapper​(Throwable exception)

      Deprecated.

    - #### executeExceptionMapperForClass

          protected javax.ws.rs.core.Response executeExceptionMapperForClass​(Throwable exception,
                                                                             Class clazz,
                                                                             RESTEasyTracingLogger logger)

    - #### executeExceptionMapperForClass

          @Deprecated
          public javax.ws.rs.core.Response executeExceptionMapperForClass​(Throwable exception,
                                                                          Class clazz)

      Deprecated.

    - #### handleApplicationException

          protected javax.ws.rs.core.Response handleApplicationException​(HttpRequest request,
                                                                         ApplicationException e,
                                                                         RESTEasyTracingLogger logger)

    - #### executeExceptionMapper

          protected javax.ws.rs.core.Response executeExceptionMapper​(Throwable exception,
                                                                     RESTEasyTracingLogger logger)

      Execute an ExceptionMapper if one exists for the given exception. Recurse to base class if not found.
      Parameters:
        `exception` - exception
        `logger` - logger
      Returns:
        true if an ExceptionMapper was found and executed

    - #### executeExceptionMapper

          @Deprecated
          public javax.ws.rs.core.Response executeExceptionMapper​(Throwable exception)

      Deprecated.

    - #### unwrapException

          protected javax.ws.rs.core.Response unwrapException​(HttpRequest request,
                                                              Throwable e,
                                                              RESTEasyTracingLogger logger)

    - #### handleFailure

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

    - #### handleClientErrorException

          protected javax.ws.rs.core.Response handleClientErrorException​(HttpRequest request,
                                                                         javax.ws.rs.ClientErrorException e)

    - #### handleWriterException

          protected javax.ws.rs.core.Response handleWriterException​(HttpRequest request,
                                                                    WriterException e,
                                                                    RESTEasyTracingLogger logger)

    - #### handleReaderException

          protected javax.ws.rs.core.Response handleReaderException​(HttpRequest request,
                                                                    ReaderException e,
                                                                    RESTEasyTracingLogger logger)

    - #### handleWebApplicationException

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

    - #### handleException

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