Interface SQLExceptionHandler


public interface SQLExceptionHandler
A handler for SQL exceptions.
Version:
1.1
Author:
matt
  • Method Details

    • handleGetConnectionException

      void handleGetConnectionException(SQLException e)
      Handle an exception triggered when a connection cannot be obtained.
      Parameters:
      e - the exception to handle
    • handleGetConnectionException

      default void handleGetConnectionException(DataSource dataSource, SQLException e)
      Handle an exception triggered when a connection cannot be obtained from a DataSource.

      This default implementation simply calls handleGetConnectionException(SQLException).

      Parameters:
      dataSource - the data source
      e - the exception to handle
      Since:
      1.1
    • handleConnectionException

      void handleConnectionException(Connection conn, SQLException e)
      Handle an exception triggered on an active Connection.
      Parameters:
      conn - the Connection the exception occurred on
      e - the exception to handle
    • handleConnectionException

      default void handleConnectionException(DataSource dataSource, Connection conn, SQLException e)
      Handle an exception triggered on an active Connection.

      This default implementation simply calls handleConnectionException(Connection, SQLException).

      Parameters:
      dataSource - the data source
      conn - the Connection the exception occurred on
      e - the exception to handle
      Since:
      1.1