|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
org.eclipse.datatools.connectivity.oda.OdaException
public class OdaException
An exception class that provides information on an ODA runtime driver error or other data provider errors.
Each OdaException
provides several kinds of information:
getMessage
.
IDataSetMetaData.getSQLStateType()
can be used to discover whether the driver returns the XOPEN type or
the SQL 99 type.
Note: The OdaException chain is different from the "Cause" that was introduced in Java SDK 1.4 Throwable. The chain is meant to handle situations where multiple (possibly unrelated) OdaExceptions may occur.
Constructor Summary | |
---|---|
OdaException()
Instantiates an OdaException object whose message text defaults to null, SQLSTATE defaults to null, and vendorCode defaults to 0. |
|
OdaException(java.lang.String message)
Instantiates an OdaException object with a message. |
|
OdaException(java.lang.String message,
java.lang.String sqlState)
Instantiates an OdaException object with a message and SQLSTATE. |
|
OdaException(java.lang.String message,
java.lang.String sqlState,
int vendorCode)
Instantiates a fully specified OdaException object. |
|
OdaException(java.lang.Throwable cause)
Instantiates an OdaException object whose message text defaults to null, and initialized with given cause. |
Method Summary | |
---|---|
java.lang.Throwable |
getCause()
Returns the cause of this OdaException , or null if the
cause is nonexistent or unknown. |
int |
getErrorCode()
Returns the vendor-specific exception code of this OdaException
object. |
OdaException |
getNextException()
Returns the next OdaException chained to this OdaException
object. |
java.lang.String |
getSQLState()
Returns the SQLSTATE of this OdaException object. |
java.lang.Throwable |
initCause(java.lang.Throwable cause)
Initializes the cause of this OdaException to the specified value. |
void |
setNextException(OdaException nextException)
Adds an OdaException object to the end of the
OdaException chain. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public OdaException()
public OdaException(java.lang.String message)
message
- description of the exception.public OdaException(java.lang.String message, java.lang.String sqlState)
message
- description of the exception.sqlState
- an XOPEN or SQL 99 code identifying the exception.public OdaException(java.lang.String message, java.lang.String sqlState, int vendorCode)
message
- description of the exception.sqlState
- an XOPEN or SQL 99 code identifying the exception.vendorCode
- a data provider vendor-specific exception code.public OdaException(java.lang.Throwable cause)
cause
- cause of exceptionMethod Detail |
---|
public java.lang.String getSQLState()
OdaException
object.
public int getErrorCode()
OdaException
object.
public OdaException getNextException()
OdaException
chained to this OdaException
object.
OdaException
object in the chain,
null if there are none.public void setNextException(OdaException nextException)
OdaException
object to the end of the
OdaException
chain.
nextException
- the new OdaException
object to be
added to the OdaException
chain.public java.lang.Throwable initCause(java.lang.Throwable cause) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
initCause
in class java.lang.Throwable
cause
- the cause of this OdaException. A null
value
is permitted and indicates that the cause is nonexistent or
unknown.
OdaException
.
java.lang.IllegalArgumentException
- if cause
is this OdaException.
IllegalStateException if this method has already been called on
this OdaException
.
java.lang.IllegalStateException
public java.lang.Throwable getCause()
OdaException
, or null
if the
cause is nonexistent or unknown.
getCause
in class java.lang.Throwable
OdaException
, or null
if the
cause is nonexistent or unknown.public java.lang.String toString()
toString
in class java.lang.Throwable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |