org.jboss.resteasy.spi

## Class Failure

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.jboss.resteasy.spi.Failure

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    DefaultOptionsMethodException, LoggableFailure, NotFoundException, ServiceDiscoveryException

      public class Failure
      extends RuntimeException

  This exception should only be used by Resteasy integrators. Applications code should use WebApplicationException.

  This is thrown by Restasy runtime when a failure occurs.
  Version:
    $Revision: 1 $
  Author:
    Bill Burke
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `errorCode`
    `protected boolean` | `loggable`
    `protected Response` | `response`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Failure(int errorCode)`
    `Failure(String s)`
    `Failure(String s, int errorCode)`
    `Failure(String s, Response response)`
    `Failure(String s, Throwable throwable)`
    `Failure(String s, Throwable throwable, int errorCode)`
    `Failure(String s, Throwable throwable, Response response)`
    `Failure(Throwable throwable)`
    `Failure(Throwable throwable, int errorCode)`
    `Failure(Throwable throwable, Response response)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getErrorCode()`
    `Response` | `getResponse()`
    `boolean` | `isLoggable()`
    `void` | `setErrorCode(int errorCode)`
    `void` | `setLoggable(boolean loggable)`
    `void` | `setResponse(Response response)`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### errorCode

          protected int errorCode

    - #### loggable

          protected boolean loggable

    - #### response

          protected Response response

  - ### Constructor Detail

    - #### Failure

          public Failure(String s,
                 Response response)

    - #### Failure

          public Failure(String s,
                 Throwable throwable,
                 Response response)

    - #### Failure

          public Failure(Throwable throwable,
                 Response response)

    - #### Failure

          public Failure(String s,
                 Throwable throwable)

    - #### Failure

          public Failure(Throwable throwable)

    - #### Failure

          public Failure(String s)

    - #### Failure

          public Failure(int errorCode)

    - #### Failure

          public Failure(String s,
                 int errorCode)

    - #### Failure

          public Failure(String s,
                 Throwable throwable,
                 int errorCode)

    - #### Failure

          public Failure(Throwable throwable,
                 int errorCode)

  - ### Method Detail

    - #### getErrorCode

          public int getErrorCode()

    - #### setErrorCode

          public void setErrorCode(int errorCode)

    - #### isLoggable

          public boolean isLoggable()

    - #### setLoggable

          public void setLoggable(boolean loggable)

    - #### getResponse

          public Response getResponse()

    - #### setResponse

          public void setResponse(Response response)

Copyright © 2014. All Rights Reserved.