uk.ac.ebi.intenz.webapp.exceptions
Class DatabaseException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by uk.ac.ebi.intenz.webapp.exceptions.DatabaseException
All Implemented Interfaces:
Serializable

public class DatabaseException
extends Exception

This exception is a wrapper around the SQLException. The purpose of this class is to provide either a user friendly version of a SQL exception or for the programmer the tough details.

Version:
2.0.0 - 27-February-2004
Author:
Michael Darsow
See Also:
Serialized Form

Constructor Summary
DatabaseException(SQLException sqlException)
          Uses a standard message.
DatabaseException(String message)
           
DatabaseException(String message, SQLException sqlException)
          Initialise this exception with a user friendly message and the SQLException object.
 
Method Summary
 String getSqlExceptionMessage()
          Return the details about this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatabaseException

public DatabaseException(String message,
                         SQLException sqlException)
Initialise this exception with a user friendly message and the SQLException object.

Parameters:
message - The self-defined message.
sqlException - SQLException instance.

DatabaseException

public DatabaseException(String message)

DatabaseException

public DatabaseException(SQLException sqlException)
Uses a standard message.

Parameters:
sqlException - SQLException instance.
Method Detail

getSqlExceptionMessage

public String getSqlExceptionMessage()
Return the details about this exception.

Returns:
SQLException message.


Copyright © 2013 EMBL-EBI. All Rights Reserved.