Class DBException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- jetbrains.buildServer.serverSide.db.DBException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ConnectionPoolExhaustedException,CouldNotConnectToDatabaseException,CouldNotConnectToHsqlException,DatabaseAccessDeniedException,DatabaseDeadlockException,DatumIsTooLargeException,DBDuplicatedRowException,DBStringValueIsTooLongException,HsqlFileDoesntExistException,HsqlInternalError,HSQLInternalInitializingError,HsqlOutOfMemoryException,HsqlOutOfMemoryOrCorruptedException,IncorrectConnectionSettingsException,JdbcDriverIsTooOldException,JdbcIncompatibilityException,LockWaitTimeoutException,MySqlIncorrectStringValueException,NoSuitableJdbcDrivers,RetryException,SecondTeamCityInstanceException,ShutdownException,TooManyRetriesException,UnexpectedDBException,UnknownDatabaseTypeException,UnsupportedSQLPhraseException
public class DBException extends RuntimeException
- Author:
- Leonid Bushuev
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description SQLExceptionexceptionSQL exception that encountered during database interaction.StringquerySQL query that occurs this problem.
-
Constructor Summary
Constructors Modifier Constructor Description DBException(String message)Trivial constructor.DBException(String message, String query)Trivial constructor.DBException(String message, String query, SQLException exception)Trivial constructor.protectedDBException(String message, Throwable cause)Empty constructor.DBException(String message, SQLException exception)Trivial constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCauseMessage()Returns the message of#causeor an empty string if no nested exceptions.SQLExceptiongetSqlException()Returns a SQL exception if specified.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
query
@Nullable public final String query
SQL query that occurs this problem.
-
exception
@Nullable public final SQLException exception
SQL exception that encountered during database interaction. Optional.
-
-
Constructor Detail
-
DBException
public DBException(String message, @Nullable String query, @Nullable SQLException exception)
Trivial constructor.- Parameters:
message- message (what is being processed when the error encountered).query- the SQL query that being processed (optional).exception- the encountered SQL exception (optional).
-
DBException
public DBException(String message, @Nullable String query)
Trivial constructor.- Parameters:
message- message (what is being processed when the error encountered).query- the SQL query that being processed (optional).
-
DBException
public DBException(String message)
Trivial constructor.- Parameters:
message- message (what is being processed when the error encountered).
-
DBException
public DBException(String message, SQLException exception)
Trivial constructor.- Parameters:
message- message (what is being processed when the error encountered).exception- the encountered SQL exception (optional).
-
-
Method Detail
-
getCauseMessage
public String getCauseMessage()
Returns the message of#causeor an empty string if no nested exceptions.- Returns:
- message or empty string.
-
getSqlException
@Nullable public SQLException getSqlException()
Returns a SQL exception if specified.- Returns:
-
-