Package 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 Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandleError(Exception exception)Handles exceptions thrown during the execution of a FutureAccess.static ExceptionprocessException(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 extendsErrorHandlingRunnable, 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, notnullexception- the exception to process, notnull- Returns:
- the resulting exception, or
nullif the exception is fully processed - Since:
- 8.7
-
-