Class Failure

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    DefaultOptionsMethodException, LoggableFailure, NotFoundException

    public class Failure
    extends java.lang.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 $
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int errorCode  
      protected boolean loggable  
      protected javax.ws.rs.core.Response response  
    • Constructor Summary

      Constructors 
      Constructor Description
      Failure​(int errorCode)  
      Failure​(java.lang.String s)  
      Failure​(java.lang.String s, int errorCode)  
      Failure​(java.lang.String s, java.lang.Throwable throwable)  
      Failure​(java.lang.String s, java.lang.Throwable throwable, int errorCode)  
      Failure​(java.lang.String s, java.lang.Throwable throwable, javax.ws.rs.core.Response response)  
      Failure​(java.lang.String s, javax.ws.rs.core.Response response)  
      Failure​(java.lang.Throwable throwable)  
      Failure​(java.lang.Throwable throwable, int errorCode)  
      Failure​(java.lang.Throwable throwable, javax.ws.rs.core.Response response)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getErrorCode()  
      javax.ws.rs.core.Response getResponse()  
      boolean isLoggable()  
      void setErrorCode​(int errorCode)  
      void setLoggable​(boolean loggable)  
      void setResponse​(javax.ws.rs.core.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 javax.ws.rs.core.Response response
    • Constructor Detail

      • Failure

        public Failure​(java.lang.String s,
                       javax.ws.rs.core.Response response)
      • Failure

        public Failure​(java.lang.String s,
                       java.lang.Throwable throwable,
                       javax.ws.rs.core.Response response)
      • Failure

        public Failure​(java.lang.Throwable throwable,
                       javax.ws.rs.core.Response response)
      • Failure

        public Failure​(java.lang.String s,
                       java.lang.Throwable throwable)
      • Failure

        public Failure​(java.lang.Throwable throwable)
      • Failure

        public Failure​(java.lang.String s)
      • Failure

        public Failure​(int errorCode)
      • Failure

        public Failure​(java.lang.String s,
                       int errorCode)
      • Failure

        public Failure​(java.lang.String s,
                       java.lang.Throwable throwable,
                       int errorCode)
      • Failure

        public Failure​(java.lang.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 javax.ws.rs.core.Response getResponse()
      • setResponse

        public void setResponse​(javax.ws.rs.core.Response response)