org.odata4j.producer.resources
Class ExceptionMappingProvider
java.lang.Object
org.odata4j.producer.resources.ExceptionMappingProvider
- All Implemented Interfaces:
- ExceptionMapper<RuntimeException>
@Provider
public class ExceptionMappingProvider
- extends Object
- implements ExceptionMapper<RuntimeException>
Provider for correctly formatted server errors. Every RuntimeException
that
is not already an ODataProducerException
is wrapped into a ServerErrorException
(resulting in an HTTP Response.Status.INTERNAL_SERVER_ERROR
).
- See Also:
ErrorResponseExtension
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
httpHeaders
@Context
protected HttpHeaders httpHeaders
producerResolver
@Context
protected ContextResolver<ODataProducer> producerResolver
uriInfo
@Context
protected UriInfo uriInfo
ExceptionMappingProvider
public ExceptionMappingProvider()
getErrorResponse
public static ErrorResponse getErrorResponse(ODataProducerException exception,
boolean includeInnerError)
toResponse
public Response toResponse(RuntimeException e)
- Specified by:
toResponse
in interface ExceptionMapper<RuntimeException>
http://odata4j.org