de.deepamehta.plugins.webservice.provider
Class CatchAllExceptionMapper

Show UML class diagram
java.lang.Object
  extended by de.deepamehta.plugins.webservice.provider.CatchAllExceptionMapper
All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<Throwable>

@Provider
public class CatchAllExceptionMapper
extends Object
implements javax.ws.rs.ext.ExceptionMapper<Throwable>

Maps all Throwables but WebApplicationExceptions to a 500 (Internal Server Error) response. A WebApplicationException's response is returned directly.

We don't want Jersey to re-throw anything against the servlet container as this would result in an interspersed illegible stack trace (see #484).


Field Summary
private  Logger logger
           
 
Constructor Summary
CatchAllExceptionMapper()
           
 
Method Summary
 javax.ws.rs.core.Response toResponse(Throwable e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private Logger logger
Constructor Detail

CatchAllExceptionMapper

public CatchAllExceptionMapper()
Method Detail

toResponse

public javax.ws.rs.core.Response toResponse(Throwable e)
Specified by:
toResponse in interface javax.ws.rs.ext.ExceptionMapper<Throwable>


Copyright © 2014. All Rights Reserved.