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 and Description
    --- | ---
    `protected boolean` | `mapperExecuted`
    `protected ResteasyProviderFactory` | `providerFactory`
    `protected Set<String>` | `unwrappedExceptions`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExceptionHandler(ResteasyProviderFactory providerFactory, Set<String> unwrappedExceptions)`

  - ### Method Summary

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

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

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

- - ### Field Detail

    - #### providerFactory

          protected ResteasyProviderFactory 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

          public Response executeExactExceptionMapper(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 Response executeExceptionMapperForClass(Throwable exception,
                                                Class clazz)

    - #### handleApplicationException

          protected Response handleApplicationException(HttpRequest request,
                                            ApplicationException e)

    - #### executeExceptionMapper

          public Response executeExceptionMapper(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 Response unwrapException(HttpRequest request,
                                 Throwable e)

    - #### handleFailure

          protected Response handleFailure(HttpRequest request,
                               Failure failure)

    - #### handleWriterException

          protected Response handleWriterException(HttpRequest request,
                                       WriterException e)

    - #### handleReaderException

          protected Response handleReaderException(HttpRequest request,
                                       ReaderException e)

    - #### handleWebApplicationException

          protected Response handleWebApplicationException(WebApplicationException wae)

    - #### handleException

          public Response handleException(HttpRequest request,
                                 Throwable e)

Copyright © 2014. All Rights Reserved.