| java.lang.Object org.apache.derby.impl.jdbc.SQLExceptionFactory org.apache.derby.impl.jdbc.SQLExceptionFactory40
SQLExceptionFactory40 | public class SQLExceptionFactory40 extends SQLExceptionFactory (Code) | | SQLExceptionFactory40 overwrites getSQLException method
to return SQLException or one of its sub class
|
Method Summary | |
public SQLException | getArgumentFerry(SQLException se) Unpack the exception, looking for an EmbedSQLException which carries
the Derby messageID and args which we will serialize across DRDA so
that the client can reconstitute a SQLException with appropriate text. | public SQLException | getSQLException(String message, String messageId, SQLException next, int severity, Throwable t, Object[] args) overwrites super class method to create JDBC4 exceptions
SQLSTATE CLASS (prefix) Exception
0A java.sql.SQLFeatureNotSupportedException
08 java.sql.SQLTransientConnectionException
22 java.sql.SQLDataException
28 java.sql.SQLInvalidAuthorizationSpecException
40 java.sql.SQLTransactionRollbackException
42 java.sql.SQLSyntaxErrorException
Note the following divergence from JDBC3 behavior: When running
a JDBC3 client, we return EmbedSQLException. |
getArgumentFerry | public SQLException getArgumentFerry(SQLException se)(Code) | | Unpack the exception, looking for an EmbedSQLException which carries
the Derby messageID and args which we will serialize across DRDA so
that the client can reconstitute a SQLException with appropriate text.
If we are running JDBC4, then the
passed-in exception will hopefully wrap an informative EmbedSQLException.
See wrapArgsForTransportAcrossDRDA() below.
|
getSQLException | public SQLException getSQLException(String message, String messageId, SQLException next, int severity, Throwable t, Object[] args)(Code) | | overwrites super class method to create JDBC4 exceptions
SQLSTATE CLASS (prefix) Exception
0A java.sql.SQLFeatureNotSupportedException
08 java.sql.SQLTransientConnectionException
22 java.sql.SQLDataException
28 java.sql.SQLInvalidAuthorizationSpecException
40 java.sql.SQLTransactionRollbackException
42 java.sql.SQLSyntaxErrorException
Note the following divergence from JDBC3 behavior: When running
a JDBC3 client, we return EmbedSQLException. That exception class
overrides Throwable.toString() and strips off the Throwable's class name.
In contrast, the following JDBC4 implementation returns
subclasses of java.sql.Exception. These subclasses inherit the behavior
of Throwable.toString(). That is, their toString() output includes
their class name. This will break code which relies on the
stripping behavior of EmbedSQLSxception.toString().
|
|
|