Package org.apache.iceberg.util
Class ExceptionUtil
java.lang.Object
org.apache.iceberg.util.ExceptionUtil
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends Exception>
voidcastAndThrow
(Throwable exception, Class<E> exceptionClass) runSafely
(ExceptionUtil.Block<R, E1, E2, E3> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, Class<? extends E1> e1Class, Class<? extends E2> e2Class, Class<? extends E3> e3Class) runSafely
(ExceptionUtil.Block<R, E1, E2, RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, Class<? extends E1> e1Class, Class<? extends E2> e2Class) static <R,
E1 extends Exception>
RrunSafely
(ExceptionUtil.Block<R, E1, RuntimeException, RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, Class<? extends E1> e1Class) static <R> R
runSafely
(ExceptionUtil.Block<R, RuntimeException, RuntimeException, RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock)
-
Method Details
-
castAndThrow
public static <E extends Exception> void castAndThrow(Throwable exception, Class<E> exceptionClass) throws E - Throws:
E
-
runSafely
public static <R> R runSafely(ExceptionUtil.Block<R, RuntimeException, RuntimeException, RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock) -
runSafely
public static <R,E1 extends Exception> R runSafely(ExceptionUtil.Block<R, E1, throws E1RuntimeException, RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, Class<? extends E1> e1Class) - Throws:
E1
-
runSafely
public static <R,E1 extends Exception, R runSafelyE2 extends Exception> (ExceptionUtil.Block<R, E1, throws E1, E2E2, RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, Class<? extends E1> e1Class, Class<? extends E2> e2Class) - Throws:
E1
E2
-
runSafely
public static <R,E1 extends Exception, R runSafelyE2 extends Exception, E3 extends Exception> (ExceptionUtil.Block<R, E1, throws E1, E2, E3E2, E3> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, Class<? extends E1> e1Class, Class<? extends E2> e2Class, Class<? extends E3> e3Class) - Throws:
E1
E2
E3
-