com.ibm.as400.resource

Class ResourceException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.ibm.as400.resource.ResourceException
  • All Implemented Interfaces:
    ReturnCodeException, java.io.Serializable

    Deprecated. 
    Use packages com.ibm.as400.access and com.ibm.as400.access.list instead.

    public class ResourceException
    extends java.lang.Exception
    implements ReturnCodeException
    The ResourceException class represents an exception that occurs when using a Resource or ResourceList. Most of the time, this exception is thrown as the result of another exception being caught. In this case, the underlying exception is available here.

    In some cases, the exception is expected by the user. For example, if the user explicitly canceled an operation, then the user expects the resulting exception. The default is that the exception is not expected by the user.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int ATTRIBUTE_READ_ONLY
      Deprecated. 
      The return code indicating that the resource attribute is read-only.
      static int ATTRIBUTES_NOT_RETURNED
      Deprecated. 
      The return code indicating that resource attributes were not returned.
      static int ATTRIBUTES_NOT_SET
      Deprecated. 
      The return code indicating that resource attributes were not set.
      static int AUTHORITY_INSUFFICIENT
      Deprecated. 
      The return code indicating that user has insuffient authority.
      static int MESSAGES_RETURNED
      Deprecated. 
      The return code indicating that AS400Message's were returned.
      static int OPERATION_FAILED
      Deprecated. 
      The return code indicating that an operation failed.
      static int OPERATION_NOT_SUPPORTED
      Deprecated. 
      The return code indicating that an operation is not supported.
      static int UNKNOWN_ERROR
      Deprecated. 
      The return code indicating that an unknown problem has occurred.
    • Constructor Summary

      Constructors 
      Constructor and Description
      ResourceException()
      Deprecated. 
      Constructs a ResourceException object.
      ResourceException(AS400Message[] messageList)
      Deprecated. 
      Constructs a ResourceException object.
      ResourceException(int returnCode)
      Deprecated. 
      Constructs a ResourceException object.
      ResourceException(int returnCode, java.lang.Throwable exception)
      Deprecated. 
      Constructs a ResourceException object.
      ResourceException(int returnCode, java.lang.Throwable exception, boolean expected)
      Deprecated. 
      Constructs a ResourceException object.
      ResourceException(java.lang.Throwable exception)
      Deprecated. 
      Constructs a ResourceException object.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      java.lang.Throwable getException()
      Deprecated. 
      Returns the underlying exception, if any.
      AS400Message[] getMessageList()
      Deprecated. 
      Returns the message list, if any.
      int getReturnCode()
      Deprecated. 
      Returns the return code.
      boolean isExpected()
      Deprecated. 
      Indicates if the exception is expected by the user.
      void unwrap()
      Deprecated. 
      Unwraps the underlying exception and throws it.
      • 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
    • Field Detail

      • ATTRIBUTES_NOT_RETURNED

        public static final int ATTRIBUTES_NOT_RETURNED
        Deprecated. 
        The return code indicating that resource attributes were not returned.
        See Also:
        Constant Field Values
      • ATTRIBUTES_NOT_SET

        public static final int ATTRIBUTES_NOT_SET
        Deprecated. 
        The return code indicating that resource attributes were not set.
        See Also:
        Constant Field Values
      • MESSAGES_RETURNED

        public static final int MESSAGES_RETURNED
        Deprecated. 
        The return code indicating that AS400Message's were returned.
        See Also:
        Constant Field Values
      • OPERATION_FAILED

        public static final int OPERATION_FAILED
        Deprecated. 
        The return code indicating that an operation failed.
        See Also:
        Constant Field Values
      • OPERATION_NOT_SUPPORTED

        public static final int OPERATION_NOT_SUPPORTED
        Deprecated. 
        The return code indicating that an operation is not supported.
        See Also:
        Constant Field Values
      • UNKNOWN_ERROR

        public static final int UNKNOWN_ERROR
        Deprecated. 
        The return code indicating that an unknown problem has occurred.
        See Also:
        Constant Field Values
      • AUTHORITY_INSUFFICIENT

        public static final int AUTHORITY_INSUFFICIENT
        Deprecated. 
        The return code indicating that user has insuffient authority.
        See Also:
        Constant Field Values
      • ATTRIBUTE_READ_ONLY

        public static final int ATTRIBUTE_READ_ONLY
        Deprecated. 
        The return code indicating that the resource attribute is read-only.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ResourceException

        public ResourceException()
        Deprecated. 
        Constructs a ResourceException object.
      • ResourceException

        public ResourceException(int returnCode)
        Deprecated. 
        Constructs a ResourceException object.
        Parameters:
        returnCode - The return code.
      • ResourceException

        public ResourceException(java.lang.Throwable exception)
        Deprecated. 
        Constructs a ResourceException object.
        Parameters:
        exception - The underlying exception.
      • ResourceException

        public ResourceException(AS400Message[] messageList)
        Deprecated. 
        Constructs a ResourceException object.
        Parameters:
        messageList - The message list.
      • ResourceException

        public ResourceException(int returnCode,
                         java.lang.Throwable exception)
        Deprecated. 
        Constructs a ResourceException object.
        Parameters:
        returnCode - The return code.
        exception - The underlying exception.
      • ResourceException

        public ResourceException(int returnCode,
                         java.lang.Throwable exception,
                         boolean expected)
        Deprecated. 
        Constructs a ResourceException object.
        Parameters:
        returnCode - The return code.
        exception - The underlying exception.
        expected - true if the exception is expected by the user, false otherwise.
    • Method Detail

      • getException

        public java.lang.Throwable getException()
        Deprecated. 
        Returns the underlying exception, if any.
        Returns:
        The underlying exception, or null if there is none.
      • getMessageList

        public AS400Message[] getMessageList()
        Deprecated. 
        Returns the message list, if any.
        Returns:
        The message list, or null if there is none.
      • getReturnCode

        public int getReturnCode()
        Deprecated. 
        Returns the return code.
        Specified by:
        getReturnCode in interface ReturnCodeException
        Returns:
        The return code.
      • isExpected

        public boolean isExpected()
        Deprecated. 
        Indicates if the exception is expected by the user. For example, if the user explicitly canceled an operation, then the user expects the resulting exception.
        Returns:
        true if exception expected