Package 

Interface Task.UnobservedExceptionHandler


  • 
    interface Task.UnobservedExceptionHandler
    
                        

    Interface for handlers invoked when a failed {@code Task} is about to befinalized, but the exception has not been consumed.

    The handler will execute in the GC thread, so if the handler needs to doanything time consuming or complex it is a good idea to fire off a {@code Task} to handle the exception.

    • Method Summary

      Modifier and Type Method Description
      abstract void unobservedException(Task<out Object> t, UnobservedTaskException e) Method invoked when the given task has an unobserved exception.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • unobservedException

         abstract void unobservedException(Task<out Object> t, UnobservedTaskException e)

        Method invoked when the given task has an unobserved exception.

        Any exception thrown by this method will be ignored.

        Parameters:
        t - the task
        e - the exception