public class DatabaseException
extends java.lang.Exception
Constructor and Description |
---|
DatabaseException(java.sql.SQLException cause,
java.lang.String message)
Constructs a new DatabaseException instance
|
DatabaseException(java.sql.SQLException cause,
java.lang.String message,
java.lang.String statement)
Constructs a new DatabaseException instance
|
DatabaseException(java.lang.String message)
Constructs a new DatabaseException instance
|
DatabaseException(java.lang.String message,
java.lang.String statement)
Constructs a new DatabaseException instance
|
Modifier and Type | Method and Description |
---|---|
int |
getErrorCode()
Returns the underlying error code, note that this is only available when running with
a local database connection.
|
java.lang.String |
getStatement()
Returns the sql statement causing this exception, if available, note that this is only
available when running with a local database connection.
|
public DatabaseException(java.lang.String message)
message
- the exception messagepublic DatabaseException(java.lang.String message, java.lang.String statement)
message
- the exception messagestatement
- the sql statement which caused the exceptionpublic DatabaseException(java.sql.SQLException cause, java.lang.String message)
cause
- the root cause, the stack trace is copied and usedmessage
- the exception messagepublic DatabaseException(java.sql.SQLException cause, java.lang.String message, java.lang.String statement)
cause
- the root cause, the stack trace is copied and usedmessage
- the exception messagestatement
- the sql statement which caused the exceptionpublic final java.lang.String getStatement()
public final int getErrorCode()