org.codegist.crest.handler
Interface ErrorHandler
- All Known Implementing Classes:
- DefaultValuesErrorHandler, ErrorDelegatorHandler
public interface ErrorHandler
Error handler gets invoked when an exception occurs during the request firing.
If implementor declares a constructor with a Map argument, it will be called with the user custom properties.
- Author:
- Laurent Gilles (laurent.gilles@codegist.org)
- See Also:
InterfaceContext.getProperties()
handle
<T> T handle(ResponseContext context,
Exception e)
throws Exception
- Type Parameters:
T
- Expected return type- Parameters:
context
- Current response context. Inner HttpResponse if not guaranteed to be available as an error could have occured during request generation lifecycle step.e
- Exception occured
- Returns:
- any value of the expected error type when exception is ignored
- Throws:
Exception
- Any thrown exception while be delegated to the client using the relative rest interface.- See Also:
ErrorHandler
Copyright © 2011. All Rights Reserved.