Interface ExceptionCatchingRunnable

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

@FunctionalInterface public interface ExceptionCatchingRunnable extends Runnable, Serializable
A serializable extension of the Runnable interface.
Author:
Laurent Cohen
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Execute this runnable.
    default void
     
    default void
    run()
     
  • Method Details

    • run

      default void run()
      Specified by:
      run in interface Runnable
    • execute

      void execute() throws Exception
      Execute this runnable.
      Throws:
      Exception - if any error occurs.
    • handleException

      default void handleException(Exception e)
      Parameters:
      e - the exception to handle.