Class LogExceptionRunnable

  • All Implemented Interfaces:
    java.lang.Runnable

    public final class LogExceptionRunnable
    extends java.lang.Object
    implements java.lang.Runnable
    A simple wrapper for a Runnable that logs any exception thrown by it, before re-throwing it.
    • Constructor Summary

      Constructors 
      Constructor Description
      LogExceptionRunnable​(java.lang.Runnable task)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LogExceptionRunnable

        public LogExceptionRunnable​(java.lang.Runnable task)
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object