com.atlassian.confluence.rest.exceptions
Class RestExceptionMapper

java.lang.Object
  extended by com.atlassian.confluence.rest.exceptions.RestExceptionMapper
All Implemented Interfaces:
javax.ws.rs.ext.ExceptionMapper<java.lang.Exception>

@Provider
public class RestExceptionMapper
extends java.lang.Object
implements javax.ws.rs.ext.ExceptionMapper<java.lang.Exception>

Converts ServiceExceptions into Responses containing RestErrors.

The conversion will be done automatically for any REST Resource that throws a ServiceException.


Constructor Summary
RestExceptionMapper()
           
 
Method Summary
 javax.ws.rs.core.Response toResponse(java.lang.Exception exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestExceptionMapper

public RestExceptionMapper()
Method Detail

toResponse

public javax.ws.rs.core.Response toResponse(java.lang.Exception exception)
Specified by:
toResponse in interface javax.ws.rs.ext.ExceptionMapper<java.lang.Exception>


Copyright © 2003-2014 Atlassian. All Rights Reserved.