An exception that provides information on a database access error or other errors.
Each SQLException provides several kinds of information:
a string describing the error. This is used as the Java Exception message, available via the method getMesasge. a "SQLstate" string, which follows either the XOPEN SQLstate conventions or the SQL:2003 conventions. The values of the SQLState string are described in the appropriate spec. The DatabaseMetaData method getSQLStateType can be used to discover whether the driver returns the XOPEN type or the SQL:2003 type. an integer error code that is specific to each vendor. Normally this will be the actual error code returned by the underlying database. a chain to a next Exception. This can be used to provide additional error information. the causal relationship, if any for this SQLException.
An exception that provides information on a database access error or other errors. Each SQLException provides several kinds of information: a string describing the error. This is used as the Java Exception message, available via the method getMesasge. a "SQLstate" string, which follows either the XOPEN SQLstate conventions or the SQL:2003 conventions. The values of the SQLState string are described in the appropriate spec. The DatabaseMetaData method getSQLStateType can be used to discover whether the driver returns the XOPEN type or the SQL:2003 type. an integer error code that is specific to each vendor. Normally this will be the actual error code returned by the underlying database. a chain to a next Exception. This can be used to provide additional error information. the causal relationship, if any for this SQLException.
(->sql-exception)
(->sql-exception reason)
(->sql-exception reason sql-state)
(->sql-exception reason sql-state vendor-code)
(->sql-exception reason sql-state vendor-code cause)
Constructor.
Constructs a SQLException object with a given reason, SQLState, vendorCode and cause.
reason - a description of the exception - java.lang.String
sql-state - an XOPEN or SQL:2003 code identifying the exception - java.lang.String
vendor-code - a database vendor-specific exception code - int
cause - the underlying reason for this SQLException (which is saved for later retrieval by the getCause() method); may be null indicating the cause is non-existent or unknown. - java.lang.Throwable
Constructor. Constructs a SQLException object with a given reason, SQLState, vendorCode and cause. reason - a description of the exception - `java.lang.String` sql-state - an XOPEN or SQL:2003 code identifying the exception - `java.lang.String` vendor-code - a database vendor-specific exception code - `int` cause - the underlying reason for this SQLException (which is saved for later retrieval by the getCause() method); may be null indicating the cause is non-existent or unknown. - `java.lang.Throwable`
(get-error-code this)
Retrieves the vendor-specific exception code for this SQLException object.
returns: the vendor's error code - int
Retrieves the vendor-specific exception code for this SQLException object. returns: the vendor's error code - `int`
(get-next-exception this)
Retrieves the exception chained to this SQLException object by setNextException(SQLException ex).
returns: the next SQLException object in the chain;
null if there are none - java.sql.SQLException
Retrieves the exception chained to this SQLException object by setNextException(SQLException ex). returns: the next SQLException object in the chain; null if there are none - `java.sql.SQLException`
(get-sql-state this)
Retrieves the SQLState for this SQLException object.
returns: the SQLState value - java.lang.String
Retrieves the SQLState for this SQLException object. returns: the SQLState value - `java.lang.String`
(iterator this)
Returns an iterator over the chained SQLExceptions. The iterator will be used to iterate over each SQLException and its underlying cause (if any).
returns: an iterator over the chained SQLExceptions and causes in the proper
order - java.util.Iterator<java.lang.Throwable>
Returns an iterator over the chained SQLExceptions. The iterator will be used to iterate over each SQLException and its underlying cause (if any). returns: an iterator over the chained SQLExceptions and causes in the proper order - `java.util.Iterator<java.lang.Throwable>`
(set-next-exception this ex)
Adds an SQLException object to the end of the chain.
ex - the new exception that will be added to the end of the SQLException chain - java.sql.SQLException
Adds an SQLException object to the end of the chain. ex - the new exception that will be added to the end of the SQLException chain - `java.sql.SQLException`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close