|
IBM DB2 Information Integrator Java API Reference for Developing Wrappers |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Throwable
java.lang.Exception
com.ibm.db2.wrapper.WrapperException
The WrapperException class is the Exception subclass
that is used by the Java API to report exceptions.
Usage:
This class is instantiated by the wrapper to report an
exception that contains either a string message or an SQL error
code, caller function name and tokens that map to a DB2
Information Integrator error message.
Constructor Summary | |
WrapperException(int errorCode,
java.lang.String functionName,
java.lang.String[] tokens)
Construct an exception object that reports a DB2 Information Integrator error by its SQL code, caller function name, and tokens. |
|
WrapperException(java.lang.String message)
Construct a new exception object with the specified message. |
Method Summary | |
int |
getAndResetErrorCode()
Retrieve and reset the SQL error code to report a DB2 Information Integrator error. |
java.lang.String |
getAndResetFunctionName()
Retrieve and reset the caller function name that reports a DB2 Information Integrator error. |
java.lang.String[] |
getAndResetTokens()
Retrieve and reset the substitution tokens that are used to report a DB2 Information Integrator error. |
int |
getErrorCode()
Retrieve the SQL error code to report a DB2 Information Integrator error. |
java.lang.String |
getFunctionName()
Retrieve the caller function name that reports a DB2 Information Integrator error. |
java.lang.String |
getMessage()
Retrieve the error message string of this exception object. |
static java.lang.String |
getStackTrace(java.lang.Throwable throwable)
Save the stack trace of the exception into a string. |
java.lang.String[] |
getTokens()
Retrieve the substitution tokens that are used to report a DB2 Information Integrator error. |
void |
setErrorCode(int errorCode)
Set the SQL error code for reporting a DB2 Information Integrator error. |
void |
setFunctionName(java.lang.String functionName)
Set the caller function name for reporting a DB2 Information Integrator error. |
void |
setTokens(java.lang.String[] tokens)
Set the substitution tokens that are used for reporting a DB2 Information Integrator error. |
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 WrapperException(int errorCode, java.lang.String functionName, java.lang.String[] tokens)
errorCode
- The predefined SQL code of the error that is reported.functionName
- The name of the function that reports the error.
The string value cannot be greater than five characters.
The client program can access this string value through the
SQLERRP field of the SQLCA. The string value is in uppercase
letters with a prefix of SQL.tokens
- The substitution tokens for the message.public WrapperException(java.lang.String message)
message
- The message that describes the exception.Exception
Method Detail |
public final int getAndResetErrorCode()
public final java.lang.String getAndResetFunctionName()
public final java.lang.String[] getAndResetTokens()
public final int getErrorCode()
public final java.lang.String getFunctionName()
public java.lang.String getMessage()
public static java.lang.String getStackTrace(java.lang.Throwable throwable)
throwable
- The throwable object that the stack trace is extracted from.
Throwable
public final java.lang.String[] getTokens()
public final void setErrorCode(int errorCode)
errorCode
- The predefined SQL code of the error that is reported.public final void setFunctionName(java.lang.String functionName)
functionName
- The name of the function that reports the error.
The string value cannot be greater than five characters.
The client program can access this string value through the
SQLERRP field of the SQLCA. The string value is in uppercase
letters with a prefix of SQL.public final void setTokens(java.lang.String[] tokens)
tokens
- The substitution tokens that are used in the error message
when a DB2 Information Integrator error is reported.
|
IBM DB2 Information Integrator Java API Reference for Developing Wrappers |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
(C)Copyright IBM Corp. 2002. All rights reserved.
Links on this page are made available for your convenience and may take you to non-IBM sites. IBM does not warrant any sample code provided on these sites.