org.cruxframework.crux.core.server.rest.core.dispatch
Class RestErrorHandler
java.lang.Object
org.cruxframework.crux.core.server.rest.core.dispatch.RestErrorHandler
- Direct Known Subclasses:
- RestErrorHandlerImpl
public abstract class RestErrorHandler
- extends Object
- Author:
- Thiago da Rosa de Bustamante
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
method
protected Method method
RestErrorHandler
public RestErrorHandler()
setMethod
protected void setMethod(Method method)
handleError
public abstract Object handleError(InvocationTargetException error)
throws RestFailure
- When an error occurs during a REST service invocation, a RestErrorHandler is called to handle this error.
This method must take the exception and throw a RestFailure to wrap the error or return an object that
will be serialized as response given from the service to the caller.
- Parameters:
error - method -
- Returns:
-
- Throws:
RestFailure
getRestExceptionTypes
protected Class<?>[] getRestExceptionTypes(Method method)
isCheckedException
protected boolean isCheckedException(Throwable throwable)
Copyright © 2015. All rights reserved.