|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--com.ibm.as400.resource.ResourceException
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.
Field Summary | |
static int |
ATTRIBUTE_READ_ONLY
The return code indicating that the resource attribute is read-only. |
static int |
ATTRIBUTES_NOT_RETURNED
The return code indicating that resource attributes were not returned. |
static int |
ATTRIBUTES_NOT_SET
The return code indicating that resource attributes were not set. |
static int |
AUTHORITY_INSUFFICIENT
The return code indicating that user has insuffient authority. |
static int |
MESSAGES_RETURNED
The return code indicating that AS/400 messages were returned. |
static int |
OPERATION_FAILED
The return code indicating that an operation failed. |
static int |
OPERATION_NOT_SUPPORTED
The return code indicating that an operation is not supported. |
static int |
UNKNOWN_ERROR
The return code indicating that an unknown problem has occurred. |
Constructor Summary | |
ResourceException()
Constructs a ResourceException object. |
|
ResourceException(AS400Message[] messageList)
Constructs a ResourceException object. |
|
ResourceException(int returnCode)
Constructs a ResourceException object. |
|
ResourceException(int returnCode,
java.lang.Throwable exception)
Constructs a ResourceException object. |
|
ResourceException(int returnCode,
java.lang.Throwable exception,
boolean expected)
Constructs a ResourceException object. |
|
ResourceException(java.lang.Throwable exception)
Constructs a ResourceException object. |
Method Summary | |
java.lang.Throwable |
getException()
Returns the underlying exception, if any. |
AS400Message[] |
getMessageList()
Returns the message list, if any. |
int |
getReturnCode()
Returns the return code. |
boolean |
isExpected()
Indicates if the exception is expected by the user. |
void |
unwrap()
Unwraps the underlying exception and throws it. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
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
Constructor Detail |
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.Method Detail |
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 AS/400.ObjectDoesNotExistException
- If the AS/400 object does not exist.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |