org.apache.derby.impl.jdbc
Class SQLExceptionFactory

java.lang.Object
  extended by org.apache.derby.impl.jdbc.SQLExceptionFactory
All Implemented Interfaces:
ExceptionFactory
Direct Known Subclasses:
SQLExceptionFactory40

public class SQLExceptionFactory
extends java.lang.Object
implements ExceptionFactory

Class to create SQLException


Constructor Summary
SQLExceptionFactory()
           
 
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 t, java.lang.Object[] args)
          method to construct SQLException version specific drivers can overload this method to create version specific exceptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLExceptionFactory

public SQLExceptionFactory()
Method Detail

getSQLException

public java.sql.SQLException getSQLException(java.lang.String message,
                                             java.lang.String messageId,
                                             java.sql.SQLException next,
                                             int severity,
                                             java.lang.Throwable t,
                                             java.lang.Object[] args)
method to construct SQLException version specific drivers can overload this method to create version specific exceptions

Specified by:
getSQLException in interface ExceptionFactory
Parameters:
message - the exception message
messageId - the message id
next - the next SQLException
severity - the severity of the exception
t - the cause of the exception
args - the message arguments
Returns:
an SQLException

getSQLException

public final 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.

Specified by:
getSQLException in interface ExceptionFactory
Parameters:
messageId - the message id
next - the next SQLException
cause - the cause of the exception
args - the message arguments
Returns:
an SQLException

getArgumentFerry

public 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 JDBC3 or JDBC2, then we hope that the passed-in exception is already an EmbedSQLException, which carries all the information we need.

Specified by:
getArgumentFerry in interface ExceptionFactory
Parameters:
se - the exception to unpack
Returns:
the argument ferry for the exception

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.