public class

RESTException

extends WebApplicationException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ javax.ws.rs.WebApplicationException
           ↳ com.atlassian.jira.rest.v2.issue.RESTException

Summary

Public Constructors
RESTException()
Creates a new RESTException for the given issue.
RESTException(ErrorCollection errors)
Creates a new RESTException for the given issue, with a collection of errors.
RESTException(Response.Status status, String... errorMessages)
RESTException(Response.Status status, ErrorCollection errors)
Creates a new RESTException for the given issue, with a collection of errors.
RESTException(Response.Status status, Throwable cause)
Creates a new RESTException for the given issue and allows to nest an exception.
Public Methods
String toString()
[Expand]
Inherited Methods
From class javax.ws.rs.WebApplicationException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public RESTException ()

Creates a new RESTException for the given issue. Whenever possible it is preferable to use RESTException(javax.ws.rs.core.Response.Status, com.atlassian.jira.rest.api.util.ErrorCollection) constructor, passing a collection of errors and the status

public RESTException (ErrorCollection errors)

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

public RESTException (Response.Status status, String... errorMessages)

public RESTException (Response.Status status, ErrorCollection errors)

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

public RESTException (Response.Status status, Throwable cause)

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.

Public Methods

public String toString ()