public class DatabaseException extends PRException
The subclass ConnectionException
(and its subclasses) represent connection errors, and the other subclasses
represent operational errors.
In most cases, when an exception is thrown, the Processing Status is set to
Error. Following are some subclasses of DatabaseException
that
are commonly used, and the messages typically used for the Processing Status
error.
See the subclasses of this class for more information about specific exception classes.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
static java.lang.String |
VERSION |
mLookUpRuleMessages
Constructor and Description |
---|
DatabaseException(int aSeverity,
java.lang.String aDescr)
Creates an exception with a severity and a message.
|
DatabaseException(java.lang.String aDescr)
Creates a database exception with a given message.
|
DatabaseException(java.lang.Throwable aCause,
int aSeverity,
java.lang.String aDescr,
java.lang.String aSQL,
java.lang.String[] aSQLInserts)
Creates a general database exception with a
given severity, and with other information.
|
DatabaseException(java.lang.Throwable aCause,
java.lang.String aDescr)
Creates a database exception with a given message,
caused by the given exception or error.
|
DatabaseException(java.lang.Throwable aCause,
java.lang.String aMsgID,
java.lang.String[] aMsgInserts,
int aSeverity,
java.lang.String aSQL,
java.lang.String[] aSQLInserts)
Creates a database exception with a
given severity, and with other information.
|
DatabaseException(java.lang.Throwable aCause,
java.lang.Throwable aSecCause,
java.lang.String aMsgID,
java.lang.String[] aMsgInserts,
int aSeverity,
java.lang.String aSQL,
java.lang.String[] aSQLInserts)
Creates a database exception with a
given severity, and with other information.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSQL() |
void |
setSQL(java.lang.String aSQL)
Associates this exception with a SQL statement.
|
void |
setSQLInserts(java.lang.String[] aSQLInserts)
Associates this exception with a list of SQL prepared statement
insert vslues.
|
isLookUpRuleMessages, setLookUpRuleMessages, toString
public static final java.lang.String COPYRIGHT
public static final java.lang.String VERSION
public DatabaseException(java.lang.Throwable aCause, java.lang.String aMsgID, java.lang.String[] aMsgInserts, int aSeverity, java.lang.String aSQL, java.lang.String[] aSQLInserts)
aMsgID
.aCause
- the exception that caused this, or null if noneaMsgID
- the message to reportaMsgInserts
- the message inserts, or null if noneaSeverity
- the severityaSQL
- the SQL we were running when the
problem occured, or null if noneaSQLInserts
- the inserts for the SQL we
were running, or null if nonepublic DatabaseException(java.lang.Throwable aCause, java.lang.Throwable aSecCause, java.lang.String aMsgID, java.lang.String[] aMsgInserts, int aSeverity, java.lang.String aSQL, java.lang.String[] aSQLInserts)
aMsgID
.aCause
- the exception that caused this, or null if noneaSecCause
- a secondary exception that may have been coveredaMsgID
- the message to reportaMsgInserts
- the message inserts, or null if noneaSeverity
- the severityaSQL
- the SQL we were running when the
problem occured, or null if noneaSQLInserts
- the inserts for the SQL we
were running, or null if nonepublic DatabaseException(java.lang.Throwable aCause, int aSeverity, java.lang.String aDescr, java.lang.String aSQL, java.lang.String[] aSQLInserts)
Database-General
.aCause
- the exception that caused this, or null if noneaSeverity
- the severityaDescr
- a description of the problemaSQL
- the SQL we were running when the
problem occured, or null if noneaSQLInserts
- the inserts for the SQL we
were running, or null if nonepublic DatabaseException(java.lang.String aDescr)
aDescr
- the messagepublic DatabaseException(int aSeverity, java.lang.String aDescr)
Database-General
.aSeverity
- the severityaDescr
- the messagepublic DatabaseException(java.lang.Throwable aCause, java.lang.String aDescr)
Database-General
.aCause
- the exception or erroraDescr
- the messagepublic void setSQL(java.lang.String aSQL)
aSQL
- the SQLpublic void setSQLInserts(java.lang.String[] aSQLInserts)
aSQLInserts
- the insert valuespublic java.lang.String getSQL()
Copyright © 2015 Pegasystems Inc. All Rights Reserved.