com.vaadin.server.
Interface ErrorHandlingRunnable
-
All Superinterfaces:
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 tohandleError(Exception)
and null is returned. IfhandleError(Exception)
throws an exception, that exception is returned. If the runnable does not extendErrorHandlingRunnable
, then the original exception is returned.Parameters:
runnable
- the runnable for which the exception should be processed, notnull
exception
- the exception to process, notnull
Returns:
the resulting exception, or
null
if the exception is fully processedSince:
8.7
-
-