Interface ThrowingRunnable

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 ThrowingRunnable
Runnable-like interface whose run() method is allowed to throw a checked Exception.

It can be used when a Runnable is required but the underlying operation may fail with a checked exception.

  • Method Summary

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

    • run

      void run() throws Exception
      Executes this runnable.
      Throws:
      Exception - if an error occurs during execution