Interface ThrowingRunnable

All Known Implementing Classes:
RunnableWithDescription
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
This exists so that we are able to slightly better manage exceptions in a highly threaded system. Here's the thing: exceptions stop bubbling up at the thread invocation. If we don't take care to deal with that in some way, we can easily just lose the information. Something could be badly broken and we could be totally oblivious to it. This interface is to alleviate that situation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run()
    The reason this throws an exception is so that lambdas don't need to try-catch their thrown exceptions when they use this.
    static Runnable
     
  • Method Details

    • run

      void run() throws Exception
      The reason this throws an exception is so that lambdas don't need to try-catch their thrown exceptions when they use this.
      Throws:
      Exception
    • throwingRunnableWrapper

      static Runnable throwingRunnableWrapper(ThrowingRunnable throwingRunnable, ILogger logger)