Package org.firebirdsql.jdbc
Class FBSQLException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.sql.SQLException
-
- org.firebirdsql.jdbc.FBSQLException
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Iterable<java.lang.Throwable>
- Direct Known Subclasses:
FBDriverConsistencyCheckException
,FBResultSetNotUpdatableException
public class FBSQLException extends java.sql.SQLException
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FBSQLException(java.lang.Exception ex)
FBSQLException(java.lang.String message)
FBSQLException(java.lang.String message, java.lang.String sqlState)
FBSQLException(java.lang.String message, java.sql.SQLException ex)
Deprecated.In all most all cases useFBSQLException(String, String)
in combination withSQLException.setNextException(SQLException)
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.String
defaultSQLStateIfNull(java.lang.String sqlState)
java.lang.Exception
getInternalException()
Deprecated.useThrowable.getCause()
instead.-
Methods inherited from class java.sql.SQLException
getErrorCode, getNextException, getSQLState, iterator, setNextException
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
FBSQLException
public FBSQLException(java.lang.Exception ex)
-
FBSQLException
public FBSQLException(java.lang.String message)
-
FBSQLException
@Deprecated public FBSQLException(java.lang.String message, java.sql.SQLException ex)
Deprecated.In all most all cases useFBSQLException(String, String)
in combination withSQLException.setNextException(SQLException)
.- Parameters:
message
- Exception messageex
- SQLException that should be set as the 'next exception'
-
FBSQLException
public FBSQLException(java.lang.String message, java.lang.String sqlState)
- Parameters:
message
- Exception messagesqlState
- SQL State for this exception. Replaced withSQLStateConstants.SQL_STATE_GENERAL_ERROR
if null
-
-
Method Detail
-
getInternalException
@Deprecated public java.lang.Exception getInternalException()
Deprecated.useThrowable.getCause()
instead.
-
defaultSQLStateIfNull
public static java.lang.String defaultSQLStateIfNull(java.lang.String sqlState)
- Parameters:
sqlState
- SQL State value (or null)- Returns:
- The passed sqlState or
SQLStateConstants.SQL_STATE_GENERAL_ERROR
if sqlState is null.
-
-