com.vaadin.server.

Interface ErrorHandlingRunnable

  • All Superinterfaces:

    Runnable, Serializable

    public interface ErrorHandlingRunnable
    extends Runnable, Serializable

    Defines the interface to handle exceptions thrown during the execution of a FutureAccess.

    Since:

    7.1.8

    Author:

    Vaadin Ltd

    • Method Summary

      All Methods
      Modifier and Type Method Description
      void handleError​(Exception exception)

      Handles exceptions thrown during the execution of a FutureAccess.

      static Exception processException​(Runnable runnable, Exception exception)

      Process the given exception in the context of the given runnable.

    • Method Detail

      • handleError

        void handleError​(Exception exception)

        Handles exceptions thrown during the execution of a FutureAccess. Exceptions thrown by this method are handled by the default error handler.

        Parameters:

        exception - the thrown exception.

        Since:

        7.1.8

      • processException

        static Exception processException​(Runnable runnable,
                                          Exception exception)

        Process the given exception in the context of the given runnable. If the runnable extends ErrorHandlingRunnable, then the exception is passed to handleError(Exception) and null is returned. If handleError(Exception) throws an exception, that exception is returned. If the runnable does not extend ErrorHandlingRunnable, then the original exception is returned.

        Parameters:

        runnable - the runnable for which the exception should be processed, not null

        exception - the exception to process, not null

        Returns:

        the resulting exception, or null if the exception is fully processed

        Since:

        8.7