Class DatabaseException

All Implemented Interfaces:
Serializable

public class DatabaseException extends RuntimeException
DatabaseException wraps SQLException exceptions thrown while interacting with the database Eventually this class will provide a common interpretation of SQLException codes regardless of the database source.
Author:
tap
See Also:
  • Constructor Details

    • DatabaseException

      public DatabaseException(String message, DatabaseAdaptor adaptor, SQLException cause)
      Constructor to wrap an SQLException
      Parameters:
      message - The exception message
      adaptor - The database adaptor to use to interpret the SQLException
      cause - The cause of the exception
  • Method Details

    • getRawErrorCode

      public int getRawErrorCode()
      Get the database specific error code.
      Returns:
      the error code of the SQLException which is the cause of this database exception