com.atlassian.jira.rest.v2.issue
Class RESTException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by javax.ws.rs.WebApplicationException
                  extended by com.atlassian.jira.rest.v2.issue.RESTException
All Implemented Interfaces:
Serializable

public class RESTException
extends javax.ws.rs.WebApplicationException

Since:
v4.2
See Also:
Serialized Form

Constructor Summary
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(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
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RESTException

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


RESTException

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

RESTException

public RESTException(javax.ws.rs.core.Response.Status status,
                     String... errorMessages)

RESTException

public RESTException(javax.ws.rs.core.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

RESTException

public RESTException(javax.ws.rs.core.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.


Copyright © 2002-2012 Atlassian. All Rights Reserved.