org.jboss.resteasy.test.application
Class FooExceptionMapper
java.lang.Object
org.jboss.resteasy.test.application.FooExceptionMapper
- All Implemented Interfaces:
- ExceptionMapper<FooException>
@Provider
public class FooExceptionMapper
- extends Object
- implements ExceptionMapper<FooException>
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FooExceptionMapper
public FooExceptionMapper(@Context
Application application,
@Context
javax.servlet.ServletConfig servletConfig,
@Context
javax.servlet.ServletContext context)
toResponse
public Response toResponse(FooException exception)
- Description copied from interface:
ExceptionMapper
- Map an exception to a
Response
. Returning
null
results in a Response.Status.NO_CONTENT
response. Throwing a runtime exception results in a
Response.Status.INTERNAL_SERVER_ERROR
response
- Specified by:
toResponse
in interface ExceptionMapper<FooException>
- Parameters:
exception
- the exception to map to a response
- Returns:
- a response mapped from the supplied exception
Copyright © 2012. All Rights Reserved.