public class DBException extends GeneralException
ERROR, errorCode, errorMessage, exceptionIsLogged, exceptionSeriousCode, FATAL_ERROR, logException, originalException, subSystem, WARNING| Constructor and Description |
|---|
DBException()
Default empty constructor.
|
DBException(int errorCode,
String errorMessage,
int subsystem,
boolean shouldBeLogged,
int seriousness,
Throwable originalException,
String host,
String dbname,
String username)
Construcuts a new GeneralException.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
log()
Override this to make your own logging mechanism
|
String |
toString() |
exceptionLogged, exceptionSeriousness, exceptionSeriousnessToString, getErrorCode, getErrorMessage, getMessage, getOriginalException, getSubSystem, shouldExceptionBeLogged, toStringSuperaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic DBException(int errorCode,
String errorMessage,
int subsystem,
boolean shouldBeLogged,
int seriousness,
Throwable originalException,
String host,
String dbname,
String username)
errorCode - The error code for the exception.errorMessage - The error message for the exception. This message is
to be displayed to the user, so it should be user-friendly.subsystem - The subsystem of where the exception originated.shouldBeLogged - Flags if the exception should be logged.seriousness - The seriousness of the exception. Should be one of
WARNING, ERROR or FATAL_ERROR.originalException - The exception leading to this exception, if any.host - The host of where the database resides.dbname - The database name where the error situation occured.username - The user name used to connect, if available.public DBException()
protected void log()
GeneralExceptionlog in class GeneralExceptionpublic String toString()
toString in class GeneralExceptionCopyright © 2006–2020 Esito AS. All rights reserved.