java.lang.Object
io.hotmoka.exceptions.CheckRunnable
Methods that check an unchecked exception thrown by a runnable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Throwable>
voidRuns a runnable and makes an unchecked exception type into checked.static <T1 extends Throwable,T2 extends Throwable, T3 extends Throwable, T4 extends Throwable, T5 extends Throwable, T6 extends Throwable, T7 extends Throwable>
voidcheck(Class<? extends T1> exception1, Class<? extends T2> exception2, Class<? extends T3> exception3, Class<? extends T4> exception4, Class<? extends T5> exception5, Class<? extends T6> exception6, Class<? extends T7> exception7, Runnable runnable) Runs a runnable and makes seven unchecked exception types into checked.static <T1 extends Throwable,T2 extends Throwable, T3 extends Throwable, T4 extends Throwable, T5 extends Throwable, T6 extends Throwable>
voidcheck(Class<? extends T1> exception1, Class<? extends T2> exception2, Class<? extends T3> exception3, Class<? extends T4> exception4, Class<? extends T5> exception5, Class<? extends T6> exception6, Runnable runnable) Runs a runnable and makes six unchecked exception types into checked.static <T1 extends Throwable,T2 extends Throwable, T3 extends Throwable, T4 extends Throwable, T5 extends Throwable>
voidcheck(Class<? extends T1> exception1, Class<? extends T2> exception2, Class<? extends T3> exception3, Class<? extends T4> exception4, Class<? extends T5> exception5, Runnable runnable) Runs a runnable and makes five unchecked exception types into checked.check(Class<? extends T1> exception1, Class<? extends T2> exception2, Class<? extends T3> exception3, Class<? extends T4> exception4, Runnable runnable) Runs a runnable and makes four unchecked exception types into checked.check(Class<? extends T1> exception1, Class<? extends T2> exception2, Class<? extends T3> exception3, Runnable runnable) Runs a runnable and makes three unchecked exception types into checked.Runs a runnable and makes two unchecked exception types into checked.
-
Method Details
-
check
public static <T extends Throwable> void check(Class<? extends T> exception, Runnable runnable) throws T Runs a runnable and makes an unchecked exception type into checked.- Type Parameters:
T- the type of the exception- Parameters:
exception- the class of the exceptionrunnable- the runnable- Throws:
T- if the runnable throws an unchecked exception with this cause
-
check
public static <T1 extends Throwable,T2 extends Throwable> void check(Class<? extends T1> exception1, Class<? extends T2> exception2, Runnable runnable) throws T1, T2 Runs a runnable and makes two unchecked exception types into checked.- Type Parameters:
T1- the first type of the exceptionT2- the second type of the exception- Parameters:
exception1- the class of the first exceptionexception2- the class of the second exceptionrunnable- the runnable- Throws:
T1- if the runnable throws an unchecked exception with this causeT2- if the runnable throws an unchecked exception with this cause
-
check
public static <T1 extends Throwable,T2 extends Throwable, void checkT3 extends Throwable> (Class<? extends T1> exception1, Class<? extends T2> exception2, Class<? extends T3> exception3, Runnable runnable) throws T1, T2, T3 Runs a runnable and makes three unchecked exception types into checked.- Type Parameters:
T1- the first type of the exceptionT2- the second type of the exceptionT3- the third type of the exception- Parameters:
exception1- the class of the first exceptionexception2- the class of the second exceptionexception3- the class of the third exceptionrunnable- the runnable- Throws:
T1- if the runnable throws an unchecked exception with this causeT2- if the runnable throws an unchecked exception with this causeT3- if the runnable throws an unchecked exception with this cause
-
check
public static <T1 extends Throwable,T2 extends Throwable, void checkT3 extends Throwable, T4 extends Throwable> (Class<? extends T1> exception1, Class<? extends T2> exception2, Class<? extends T3> exception3, Class<? extends T4> exception4, Runnable runnable) throws T1, T2, T3, T4 Runs a runnable and makes four unchecked exception types into checked.- Type Parameters:
T1- the first type of the exceptionT2- the second type of the exceptionT3- the third type of the exceptionT4- the fourth type of the exception- Parameters:
exception1- the class of the first exceptionexception2- the class of the second exceptionexception3- the class of the third exceptionexception4- the class of the fourth exceptionrunnable- the runnable- Throws:
T1- if the runnable throws an unchecked exception with this causeT2- if the runnable throws an unchecked exception with this causeT3- if the runnable throws an unchecked exception with this causeT4- if the runnable throws an unchecked exception with this cause
-
check
public static <T1 extends Throwable,T2 extends Throwable, void checkT3 extends Throwable, T4 extends Throwable, T5 extends Throwable> (Class<? extends T1> exception1, Class<? extends T2> exception2, Class<? extends T3> exception3, Class<? extends T4> exception4, Class<? extends T5> exception5, Runnable runnable) throws T1, T2, T3, T4, T5 Runs a runnable and makes five unchecked exception types into checked.- Type Parameters:
T1- the first type of the exceptionT2- the second type of the exceptionT3- the third type of the exceptionT4- the fourth type of the exceptionT5- the fifth type of the exception- Parameters:
exception1- the class of the first exceptionexception2- the class of the second exceptionexception3- the class of the third exceptionexception4- the class of the fourth exceptionexception5- the class of the fifth exceptionrunnable- the runnable- Throws:
T1- if the runnable throws an unchecked exception with this causeT2- if the runnable throws an unchecked exception with this causeT3- if the runnable throws an unchecked exception with this causeT4- if the runnable throws an unchecked exception with this causeT5- if the runnable throws an unchecked exception with this cause
-
check
public static <T1 extends Throwable,T2 extends Throwable, void checkT3 extends Throwable, T4 extends Throwable, T5 extends Throwable, T6 extends Throwable> (Class<? extends T1> exception1, Class<? extends T2> exception2, Class<? extends T3> exception3, Class<? extends T4> exception4, Class<? extends T5> exception5, Class<? extends T6> exception6, Runnable runnable) throws T1, T2, T3, T4, T5, T6 Runs a runnable and makes six unchecked exception types into checked.- Type Parameters:
T1- the first type of the exceptionT2- the second type of the exceptionT3- the third type of the exceptionT4- the fourth type of the exceptionT5- the fifth type of the exceptionT6- the sixth type of the exception- Parameters:
exception1- the class of the first exceptionexception2- the class of the second exceptionexception3- the class of the third exceptionexception4- the class of the fourth exceptionexception5- the class of the fifth exceptionexception6- the class of the sixth exceptionrunnable- the runnable- Throws:
T1- if the runnable throws an unchecked exception with this causeT2- if the runnable throws an unchecked exception with this causeT3- if the runnable throws an unchecked exception with this causeT4- if the runnable throws an unchecked exception with this causeT5- if the runnable throws an unchecked exception with this causeT6- if the runnable throws an unchecked exception with this cause
-
check
public static <T1 extends Throwable,T2 extends Throwable, void checkT3 extends Throwable, T4 extends Throwable, T5 extends Throwable, T6 extends Throwable, T7 extends Throwable> (Class<? extends T1> exception1, Class<? extends T2> exception2, Class<? extends T3> exception3, Class<? extends T4> exception4, Class<? extends T5> exception5, Class<? extends T6> exception6, Class<? extends T7> exception7, Runnable runnable) throws T1, T2, T3, T4, T5, T6, T7 Runs a runnable and makes seven unchecked exception types into checked.- Type Parameters:
T1- the first type of the exceptionT2- the second type of the exceptionT3- the third type of the exceptionT4- the fourth type of the exceptionT5- the fifth type of the exceptionT6- the sixth type of the exceptionT7- the seventh type of the exception- Parameters:
exception1- the class of the first exceptionexception2- the class of the second exceptionexception3- the class of the third exceptionexception4- the class of the fourth exceptionexception5- the class of the fifth exceptionexception6- the class of the sixth exceptionexception7- the class of the seventh exceptionrunnable- the runnable- Throws:
T1- if the runnable throws an unchecked exception with this causeT2- if the runnable throws an unchecked exception with this causeT3- if the runnable throws an unchecked exception with this causeT4- if the runnable throws an unchecked exception with this causeT5- if the runnable throws an unchecked exception with this causeT6- if the runnable throws an unchecked exception with this causeT7- if the runnable throws an unchecked exception with this cause
-