public abstract class ServiceExceptionMapper extends Object implements javax.ws.rs.ext.ExceptionMapper<Exception>
ServiceException
s into Response
s containing RestError
s.
The conversion will be done automatically for any REST Resource that throws a ServiceException.
To get the benefit of this mapping in your plugin, currently you need to implement this class in the package with your rest resources and annotate the implementing class with javax.ws.rs.ext.ProviderConstructor and Description |
---|
ServiceExceptionMapper() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
_annotateThisClassWithProvider()
This method exists to remind developers that they need to annotate the implementing class with
jersey's javax.ws.rs.ext.Provider annotation.
|
javax.ws.rs.core.Response |
toResponse(Exception exception) |
public final javax.ws.rs.core.Response toResponse(Exception exception)
toResponse
in interface javax.ws.rs.ext.ExceptionMapper<Exception>
protected abstract void _annotateThisClassWithProvider()
Copyright © 2003–2016 Atlassian. All rights reserved.