Package com.atlassian.jira.rest.v2.issue
Class RESTException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
javax.ws.rs.WebApplicationException
com.atlassian.jira.rest.v2.issue.RESTException
- All Implemented Interfaces:
Serializable
public class RESTException
extends javax.ws.rs.WebApplicationException
- Since:
- v4.2
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new RESTException for the given issue.RESTException
(ErrorCollection errors) Creates a new RESTException for the given issue, with a collection of errors.RESTException
(javax.ws.rs.core.Response.Status status, ErrorCollection errors) Creates a new RESTException for the given issue, with a collection of errors.RESTException
(javax.ws.rs.core.Response.Status status, String... errorMessages) RESTException
(javax.ws.rs.core.Response.Status status, Throwable cause) Creates a new RESTException for the given issue and allows to nest an exception. -
Method Summary
Methods inherited from class javax.ws.rs.WebApplicationException
getResponse
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
RESTException
public RESTException()Creates a new RESTException for the given issue. Whenever possible it is preferable to useRESTException(javax.ws.rs.core.Response.Status, com.atlassian.jira.rest.api.util.ErrorCollection)
constructor, passing a collection of errors and the status -
RESTException
Creates a new RESTException for the given issue, with a collection of errors. The HTTP status is derived from the ErrorCollection.- Parameters:
errors
- an ErrorCollection containing the errors
-
RESTException
-
RESTException
Creates a new RESTException for the given issue, with a collection of errors.- Parameters:
status
- the HTTP status of this error (401, 403, etc)errors
- an ErrorCollection containing the errors
-
RESTException
Creates a new RESTException for the given issue and allows to nest an exception.- Parameters:
status
- the HTTP status of this error (401, 403, etc)cause
- the nested exception that will be logged by the ExceptionInterceptor, before returning the response to the user.
-
-
Method Details