Interface SqlExceptionHandler

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@Alpha @FunctionalInterface public interface SqlExceptionHandler
Handler for exceptions thrown while executing SQL statements.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Take action based on a SQLException thrown during statement execution.
  • Method Details

    • handle

      void handle(SQLException ex, StatementContext ctx)
      Take action based on a SQLException thrown during statement execution. If you would like to replace the thrown exception with a new one, you may throw from this method. If the method returns normally, exception handling proceeds to the next oldest registered handler. If no handler opts to throw, the original exception will propagate wrapped by an UnableToExecuteStatementException.
      Parameters:
      ex - the exception thrown
      ctx - the statement context