public class ExceptionHandler extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
mapperExecuted |
protected ResteasyProviderFactory |
providerFactory |
protected Set<String> |
unwrappedExceptions |
Constructor and Description |
---|
ExceptionHandler(ResteasyProviderFactory providerFactory,
Set<String> unwrappedExceptions) |
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) |
protected ResteasyProviderFactory providerFactory
protected boolean mapperExecuted
public ExceptionHandler(ResteasyProviderFactory providerFactory, Set<String> unwrappedExceptions)
public boolean isMapperExecuted()
public Response executeExactExceptionMapper(Throwable exception)
exception
- public Response executeExceptionMapperForClass(Throwable exception, Class clazz)
protected Response handleApplicationException(HttpRequest request, ApplicationException e)
public Response executeExceptionMapper(Throwable exception)
exception
- protected Response unwrapException(HttpRequest request, Throwable e)
protected Response handleFailure(HttpRequest request, Failure failure)
protected Response handleWriterException(HttpRequest request, WriterException e)
protected Response handleReaderException(HttpRequest request, ReaderException e)
protected Response handleWebApplicationException(WebApplicationException wae)
public Response handleException(HttpRequest request, Throwable e)
Copyright © 2013. All Rights Reserved.