Interface Strand.UncaughtExceptionHandler

  • Enclosing class:
    Strand

    public static interface Strand.UncaughtExceptionHandler
    Interface for handlers invoked when a Strand abruptly terminates due to an uncaught exception.

    When a fiber is about to terminate due to an uncaught exception, the Java Virtual Machine will query the fiber for its UncaughtExceptionHandler using Strand.getUncaughtExceptionHandler() and will invoke the handler's uncaughtException method, passing the fiber and the exception as arguments.

    See Also:
    Strand.setUncaughtExceptionHandler(UncaughtExceptionHandler)
    • Method Detail

      • uncaughtException

        void uncaughtException​(Strand f,
                               java.lang.Throwable e)
        Method invoked when the given fiber terminates due to the given uncaught exception.

        Any exception thrown by this method will be ignored.

        Parameters:
        f - the fiber
        e - the exception