DB2 Version 9.7 for Linux, UNIX, and Windows

DB2Diagnosable interface

The com.ibm.db2.jcc.DB2Diagnosable interface provides a mechanism for getting additional diagnostic information from an SQLException.

DB2Diagnosable methods

The following methods are defined only for the IBM® Data Server Driver for JDBC and SQLJ.
getSqlca
Format:
public DB2Sqlca getSqlca();

Returns a DB2Sqlca object from a java.sql.Exception that is produced under a IBM Data Server Driver for JDBC and SQLJ.

getThrowable
Format:
public Throwable getThrowable();

Returns a java.lang.Throwable object from a java.sql.Exception that is produced under a IBM Data Server Driver for JDBC and SQLJ.

printTrace
Format:
static public void printTrace(java.io.PrintWriter printWriter, 
  String header);

Prints diagnostic information after a java.sql.Exception is thrown under a IBM Data Server Driver for JDBC and SQLJ.

Parameter descriptions:
printWriter
The destination for the diagnostic information.
header
User-defined information that is printed at the beginning of the output.