org.apache.derby.client.am
Class SqlException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.derby.client.am.SqlException
-
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- DisconnectException, SqlWarning
public class SqlException extends java.lang.Exception- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringCLIENT_MESSAGE_RESOURCE_NAME
-
Constructor Summary
Constructors Constructor and Description SqlException(LogWriter logwriter, ClientMessageId msgid, java.lang.Object... args)SqlException(LogWriter logWriter, ClientMessageId msgid, SqlCode sqlcode, java.lang.Object... args)SqlException(LogWriter logWriter, ClientMessageId msgid, java.lang.Throwable cause, java.lang.Object... args)SqlException(LogWriter logWriter, Sqlca sqlca)Create an exception for an engine generated error.SqlException(java.sql.SQLException wrapme)Wrap a SQLException in a SqlException.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetErrorCode()java.lang.StringgetMessage()static MessageUtilgetMessageUtil()This routine provides singleton access to an instance of MessageUtil that is constructed for client messages.SqlExceptiongetNextException()SqlcagetSqlca()java.sql.SQLExceptiongetSQLException()Convert this SqlException into a java.sql.SQLExceptionjava.lang.StringgetSQLState()voidsetNextException(SqlException nextException)voidsetNextException(java.sql.SQLException nextException)java.lang.StringtoString()
-
-
-
Field Detail
-
CLIENT_MESSAGE_RESOURCE_NAME
public static final java.lang.String CLIENT_MESSAGE_RESOURCE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SqlException
public SqlException(LogWriter logWriter, ClientMessageId msgid, SqlCode sqlcode, java.lang.Object... args)
-
SqlException
public SqlException(LogWriter logWriter, ClientMessageId msgid, java.lang.Throwable cause, java.lang.Object... args)
-
SqlException
public SqlException(LogWriter logwriter, ClientMessageId msgid, java.lang.Object... args)
-
SqlException
public SqlException(LogWriter logWriter, Sqlca sqlca)
Create an exception for an engine generated error.- Parameters:
logWriter- object used for tracingsqlca- the SQLCA sent from the server
-
SqlException
public SqlException(java.sql.SQLException wrapme)
Wrap a SQLException in a SqlException. This is used by internal routines so the don't have to throw SQLException, which, through the chain of dependencies would force more and more internal routines to throw SQLException
-
-
Method Detail
-
getMessageUtil
public static MessageUtil getMessageUtil()
This routine provides singleton access to an instance of MessageUtil that is constructed for client messages. It is recommended to use this singleton rather than create your own instance. The only time you need this instance is if you need to directly format an internationalized message string. In most instances this is done for you when you invoke a SqlException constructor- Returns:
- a singleton instance of MessageUtil configured for client messages
-
getSQLException
public java.sql.SQLException getSQLException()
Convert this SqlException into a java.sql.SQLException
-
getSqlca
public Sqlca getSqlca()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Throwable
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessagein classjava.lang.Throwable
-
getSQLState
public java.lang.String getSQLState()
-
getErrorCode
public int getErrorCode()
-
getNextException
public SqlException getNextException()
-
setNextException
public void setNextException(SqlException nextException)
-
setNextException
public void setNextException(java.sql.SQLException nextException)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG