@Provider public static class MyApp.PrintingErrorHandler extends Object implements ExceptionMapper<Throwable>
Constructor and Description |
---|
MyApp.PrintingErrorHandler() |
public Response toResponse(Throwable throwable)
ExceptionMapper
Response
. Returning
null
results in a Response.Status.NO_CONTENT
response. Throwing a runtime exception results in a
Response.Status.INTERNAL_SERVER_ERROR
response.toResponse
in interface ExceptionMapper<Throwable>
throwable
- the exception to map to a response.Copyright © 2013. All Rights Reserved.