Interface ExceptionHandler


public interface ExceptionHandler
Encapsulates reusable logic for handling exceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    void
    Handles the given Throwable.
  • Method Details

    • canHandle

      boolean canHandle(Throwable t)
      Returns:
      true if this ExceptionHandler knows how to handle the given Throwable, and false otherwise.
    • handle

      void handle(Throwable t)
      Handles the given Throwable. This ExceptionHandler may throw an exception of its own if canHandle(t) returns false.