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.

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

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

    • handle

      @Nullable Throwable handle(SQLException ex)
      Take action based on a SQLException thrown during statement execution. If you return a replacement exception, before throwing it Jdbi will automatically attach the original exception as "suppressed", so don't do that.
      Parameters:
      ex - the exception thrown
      Returns:
      a replacement exception to throw, or null to defer