Package org.jboss.resteasy.core
Class ExceptionHandler
- java.lang.Object
-
- org.jboss.resteasy.core.ExceptionHandler
-
public class ExceptionHandler extends java.lang.Object
- Version:
- $Revision: 1 $
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
mapperExecuted
protected ResteasyProviderFactory
providerFactory
protected java.util.Set<java.lang.String>
unwrappedExceptions
-
Constructor Summary
Constructors Constructor Description ExceptionHandler(ResteasyProviderFactory providerFactory, java.util.Set<java.lang.String> unwrappedExceptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.javax.ws.rs.core.Response
executeExceptionMapper(java.lang.Throwable exception)
Execute an ExceptionMapper if one exists for the given exception.javax.ws.rs.core.Response
executeExceptionMapperForClass(java.lang.Throwable exception, java.lang.Class clazz)
protected javax.ws.rs.core.Response
handleApplicationException(HttpRequest request, ApplicationException e)
javax.ws.rs.core.Response
handleException(HttpRequest request, java.lang.Throwable e)
protected javax.ws.rs.core.Response
handleFailure(HttpRequest request, Failure failure)
protected javax.ws.rs.core.Response
handleReaderException(HttpRequest request, ReaderException e)
protected javax.ws.rs.core.Response
handleWebApplicationException(javax.ws.rs.WebApplicationException wae)
protected javax.ws.rs.core.Response
handleWriterException(HttpRequest request, WriterException e)
boolean
isMapperExecuted()
protected javax.ws.rs.core.Response
unwrapException(HttpRequest request, java.lang.Throwable e)
-
-
-
Field Detail
-
providerFactory
protected ResteasyProviderFactory providerFactory
-
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)
-
handleApplicationException
protected javax.ws.rs.core.Response handleApplicationException(HttpRequest request, ApplicationException e)
-
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)
-
handleWriterException
protected javax.ws.rs.core.Response handleWriterException(HttpRequest request, WriterException e)
-
handleReaderException
protected javax.ws.rs.core.Response handleReaderException(HttpRequest request, ReaderException e)
-
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)
-
-