Class CheckedRunnable

java.lang.Object
org.jjazz.utilities.api.CheckedRunnable
All Implemented Interfaces:
Runnable

public class CheckedRunnable extends Object implements Runnable
A wrapper for a runnable which makes unexpected runtime problems visible.

By default a Runnable passed to an ExecutorService will stop with no info if an unexpected Exception or Error occurs. Use this wrapper to make sure that such Exception or Error is logged with a stack trace.

  • Constructor Details

    • CheckedRunnable

      public CheckedRunnable(Runnable r)
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable