public class ResourceException extends java.lang.Exception implements ReturnCodeException
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.
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 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.
|
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.
|
public static final int ATTRIBUTES_NOT_RETURNED
public static final int ATTRIBUTES_NOT_SET
public static final int MESSAGES_RETURNED
public static final int OPERATION_FAILED
public static final int OPERATION_NOT_SUPPORTED
public static final int UNKNOWN_ERROR
public static final int AUTHORITY_INSUFFICIENT
public static final int ATTRIBUTE_READ_ONLY
public ResourceException()
public ResourceException(int returnCode)
returnCode
- The return code.public ResourceException(java.lang.Throwable exception)
exception
- The underlying exception.public ResourceException(AS400Message[] messageList)
messageList
- The message list.public ResourceException(int returnCode, java.lang.Throwable exception)
returnCode
- The return code.exception
- The underlying exception.public ResourceException(int returnCode, java.lang.Throwable exception, boolean expected)
returnCode
- The return code.exception
- The underlying exception.expected
- true if the exception is expected by the user,
false otherwise.public java.lang.Throwable getException()
public AS400Message[] getMessageList()
public int getReturnCode()
getReturnCode
in interface ReturnCodeException
public boolean isExpected()
public void unwrap() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the system object does not exist.