org.apache.derby.iapi.jdbc
Interface ExceptionFactory

All Known Implementing Classes:
SQLExceptionFactory, SQLExceptionFactory40

public interface ExceptionFactory

An exception factory is used to create SQLExceptions of the correct type.


Method Summary
 java.sql.SQLException getArgumentFerry(java.sql.SQLException se)
          Unpack a SQL 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.
 java.sql.SQLException getSQLException(java.lang.String messageId, java.sql.SQLException next, java.lang.Throwable cause, java.lang.Object[] args)
          Construct an SQLException whose message and severity are derived from the message id.
 java.sql.SQLException getSQLException(java.lang.String message, java.lang.String messageId, java.sql.SQLException next, int severity, java.lang.Throwable cause, java.lang.Object[] args)
          Construct an SQLException whose message and severity are specified explicitly.
 

Method Detail

getArgumentFerry

java.sql.SQLException getArgumentFerry(java.sql.SQLException se)
Unpack a SQL 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 JDBC 3, then we hope that the passed-in exception is already an EmbedSQLException, which carries all the information we need.

Parameters:
se - the exception to unpack
Returns:
the argument ferry for the exception

getSQLException

java.sql.SQLException getSQLException(java.lang.String message,
                                      java.lang.String messageId,
                                      java.sql.SQLException next,
                                      int severity,
                                      java.lang.Throwable cause,
                                      java.lang.Object[] args)
Construct an SQLException whose message and severity are specified explicitly.

Parameters:
message - the exception message
messageId - the message id
next - the next SQLException
severity - the severity of the exception
cause - the cause of the exception
args - the message arguments
Returns:
an SQLException

getSQLException

java.sql.SQLException getSQLException(java.lang.String messageId,
                                      java.sql.SQLException next,
                                      java.lang.Throwable cause,
                                      java.lang.Object[] args)
Construct an SQLException whose message and severity are derived from the message id.

Parameters:
messageId - the message id
next - the next SQLException
cause - the cause of the exception
args - the message arguments
Returns:
an SQLException

Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.