org.eclipse.emf.emfstore.client.util
Class RunESCommand.WithException
java.lang.Object
org.eclipse.emf.emfstore.client.util.RunESCommand.WithException
- Enclosing class:
- RunESCommand
public static class RunESCommand.WithException
- extends Object
The Callable to be executed may throw an exception.
RunESCommand.WithException
public RunESCommand.WithException()
runWithResult
public static <T,E extends Exception> T runWithResult(Class<E> exceptionType,
Callable<T> callable)
throws E extends Exception
- Executes the given @link Callable} and returns the result.
- Type Parameters:
E - Exception in case an error occurs during execution of the CallableT - the return type of the Callable- Parameters:
callable - the callable to be execuedexceptionType - the type of the exception that might be thrown during execution
- Returns:
- the return value of the Callable
- Throws:
E - on execution failure
E extends Exception
run
public static <T extends Exception> void run(Class<T> exceptionType,
Callable<Void> callable)
throws T extends Exception
- Executes the given
Callable and returns the result.
- Type Parameters:
T - the exception type- Parameters:
callable - the callable to be executedexceptionType - the type of the exception
- Throws:
T - in case an error occurs during execution of the callable
T extends Exception
Copyright © 2015. All Rights Reserved.