org.apache.olingo.odata2.api.processor
Interface ODataErrorCallback
- All Superinterfaces:
- ODataCallback
- All Known Implementing Classes:
- ODataJPAErrorCallback, ScenarioErrorCallback
public interface ODataErrorCallback
- extends ODataCallback
This interface is called if an error occurred and is process inside the exception mapper.
handleError
ODataResponse handleError(ODataErrorContext context)
throws ODataApplicationException
- This method can be used to handle an error differently than the exception mapper would.
Any returned Response will be directly transported to the client.
Any thrown ODataApplicationException
will be transformed into the OData error format.
Any thrown runtime exception will result in an 500 Internal Server error with the Text:
"Exception during error handling occurred!" No OData formatting will be applied.
To serialize an error into the OData format the EntityProvider
writeErrorDocument can be used.
- Parameters:
context
- of this error
- Returns:
- the response which will be propagated to the client
- Throws:
ODataApplicationException
Copyright © 2013-2015 The Apache Software Foundation. All Rights Reserved.