Package org.apache.derby.iapi.jdbc
Class ExceptionFactory
java.lang.Object
org.apache.derby.iapi.jdbc.ExceptionFactory
- Direct Known Subclasses:
SQLExceptionFactory
An exception factory is used to create SQLExceptions of the correct type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ExceptionFactory
The singleton ExceptionFactory instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExceptionFactory
Get the singleton exception factory instance.abstract SQLException
getSQLException
(String message, String messageId, SQLException next, int severity, Throwable cause, Object... args) Construct an SQLException whose message and severity are specified explicitly.abstract SQLException
getSQLException
(String messageId, SQLException next, Throwable cause, Object... args) Construct an SQLException whose message and severity are derived from the message id.
-
Field Details
-
INSTANCE
The singleton ExceptionFactory instance.
-
-
Constructor Details
-
ExceptionFactory
public ExceptionFactory()
-
-
Method Details
-
getInstance
Get the singleton exception factory instance.- Returns:
- an
ExceptionFactory
instance
-
getSQLException
public abstract SQLException getSQLException(String message, String messageId, SQLException next, int severity, Throwable cause, Object... args) Construct an SQLException whose message and severity are specified explicitly.- Parameters:
message
- the exception messagemessageId
- the message idnext
- the next SQLExceptionseverity
- the severity of the exceptioncause
- the cause of the exceptionargs
- the message arguments- Returns:
- an SQLException
-
getSQLException
public abstract SQLException getSQLException(String messageId, SQLException next, Throwable cause, Object... args) Construct an SQLException whose message and severity are derived from the message id.- Parameters:
messageId
- the message idnext
- the next SQLExceptioncause
- the cause of the exceptionargs
- the message arguments- Returns:
- an SQLException
-