ResourceExceptionpublic class ResourceException extends Exception This is the root interface of the exception hierarchy defined
for the Connector architecture.
The ResourceException provides the following information:
- A resource adapter vendor specific string describing the error.
This string is a standard Java exception message and is available
through getMessage() method.
- resource adapter vendor specific error code.
- reference to another exception. Often a resource exception
will be result of a lower level problem. If appropriate, this
lower level exception can be linked to the ResourceException.
Note, this has been deprecated in favor of J2SE release 1.4 exception
chaining facility.
|
Fields Summary |
---|
private String | errorCodeVendor specific error code | private Exception | linkedExceptionreference to another exception |
Constructors Summary |
---|
public ResourceException()Constructs a new instance with null as its detail message. super();
| public ResourceException(String message)Constructs a new instance with the specified detail message.
super(message);
| public ResourceException(Throwable cause)Constructs a new throwable with the specified cause.
super(cause);
| public ResourceException(String message, Throwable cause)Constructs a new throwable with the specified detail message and cause.
super(message, cause);
| public ResourceException(String message, String errorCode)Create a new throwable with the specified message and error code.
super(message);
this.errorCode = errorCode;
|
Methods Summary |
---|
public java.lang.String | getErrorCode()Get the error code.
return this.errorCode;
| public java.lang.Exception | getLinkedException()Get the exception linked to this ResourceException
return (linkedException);
| public java.lang.String | getMessage()Returns a detailed message string describing this exception.
String msg = super.getMessage();
String ec = getErrorCode();
if ((msg == null) && (ec == null)) {
return null;
}
if ((msg != null) && (ec != null)) {
return (msg + ", error code: " + ec);
}
return ((msg != null) ? msg : ("error code: " + ec));
| public void | setErrorCode(java.lang.String errorCode)Set the error code.
this.errorCode = errorCode;
| public void | setLinkedException(java.lang.Exception ex)Add a linked Exception to this ResourceException.
linkedException = ex;
|
|