|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
javax.resource.ResourceException
This is the root exception for the exception hierarchy defined for the connector architecture. A ResourceException contains three items, the first two of which are set from the constructor. The first is a standard message string which is accessed via the getMessage() method. The second is an errorCode which is accessed via the getErrorCode() method. The third is a linked exception which provides more information from a lower level in the resource manager. Linked exceptions are accessed via get/setLinkedException.
Constructor Summary | |
ResourceException()
Create an exception with a null reason. |
|
ResourceException(java.lang.String reason)
Create an exception with a reason. |
|
ResourceException(java.lang.String reason,
java.lang.String errorCode)
Create an exception with a reason and an errorCode. |
|
ResourceException(java.lang.String reason,
java.lang.Throwable throwable)
Create an exception with a reason and an errorCode. |
|
ResourceException(java.lang.Throwable throwable)
Create an exception with a reason and an errorCode. |
Method Summary | |
java.lang.String |
getErrorCode()
Get the error code. |
java.lang.Exception |
getLinkedException()
Get any linked exception. |
java.lang.String |
getMessage()
Get the message composed of the reason and error code. |
void |
setErrorCode(java.lang.String errorCode)
Set the error code. |
void |
setLinkedException(java.lang.Exception linkedException)
Deprecated. use initCause |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ResourceException()
public ResourceException(java.lang.String reason)
reason
- the reasonpublic ResourceException(java.lang.String reason, java.lang.String errorCode)
reason
- the reasonerrorCode
- the error codepublic ResourceException(java.lang.String reason, java.lang.Throwable throwable)
reason
- the reasonthrowable
- the linked errorpublic ResourceException(java.lang.Throwable throwable)
throwable
- the linked errorMethod Detail |
public java.lang.String getErrorCode()
public java.lang.Exception getLinkedException()
public java.lang.String getMessage()
public void setErrorCode(java.lang.String errorCode)
errorCode
- code the error codepublic void setLinkedException(java.lang.Exception linkedException)
linkedException
- the linked exception
|
||||||||||
PREV CLASS (src) NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |