Class ResourceProcessorException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ResourceProcessorException
    extends java.lang.Exception
    Checked exception received when something fails during a call to a Resource Processor. A ResourceProcessorException always contains an error code (one of the constants specified in this class), and may optionally contain the textual description of the error condition and a nested cause exception.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Throwable getCause()
      Returns the cause of this exception or null if no cause was set.
      int getCode()  
      java.lang.Throwable initCause​(java.lang.Throwable cause)
      Initializes the cause of this exception to the specified value.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • CODE_OTHER_ERROR

        public static final int CODE_OTHER_ERROR
        Other error condition.

        All Resource Processor methods which throw ResourceProcessorException is allowed throw an exception with this error code if the error condition cannot be categorized.

        See Also:
        Constant Field Values
    • Constructor Detail

      • ResourceProcessorException

        public ResourceProcessorException​(int code,
                                          java.lang.String message,
                                          java.lang.Throwable cause)
        Create an instance of the exception.
        Parameters:
        code - The error code of the failure. Code should be one of the predefined integer values (CODE_X).
        message - Message associated with the exception
        cause - the originating exception
      • ResourceProcessorException

        public ResourceProcessorException​(int code,
                                          java.lang.String message)
        Create an instance of the exception. Cause exception is implicitly set to null.
        Parameters:
        code - The error code of the failure. Code should be one of the predefined integer values (CODE_X).
        message - Message associated with the exception
      • ResourceProcessorException

        public ResourceProcessorException​(int code)
        Create an instance of the exception. Cause exception and message are implicitly set to null.
        Parameters:
        code - The error code of the failure. Code should be one of the predefined integer values (CODE_X).
    • Method Detail

      • getCause

        public java.lang.Throwable getCause()
        Returns the cause of this exception or null if no cause was set.
        Overrides:
        getCause in class java.lang.Throwable
        Returns:
        The cause of this exception or null if no cause was set.
      • initCause

        public java.lang.Throwable initCause​(java.lang.Throwable cause)
        Initializes the cause of this exception to the specified value.
        Overrides:
        initCause in class java.lang.Throwable
        Parameters:
        cause - The cause of this exception.
        Returns:
        This exception.
        Throws:
        java.lang.IllegalArgumentException - If the specified cause is this exception.
        java.lang.IllegalStateException - If the cause of this exception has already been set.
        Since:
        1.0.1
      • getCode

        public int getCode()
        Returns:
        Returns the code.