Package org.apache.iceberg.util
Class ExceptionUtil
- java.lang.Object
-
- org.apache.iceberg.util.ExceptionUtil
-
public class ExceptionUtil extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ExceptionUtil.Block<R,E1 extends java.lang.Exception,E2 extends java.lang.Exception,E3 extends java.lang.Exception>
static interface
ExceptionUtil.CatchBlock
static interface
ExceptionUtil.FinallyBlock
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E extends java.lang.Exception>
voidcastAndThrow(java.lang.Throwable exception, java.lang.Class<E> exceptionClass)
static <R,E1 extends java.lang.Exception,E2 extends java.lang.Exception,E3 extends java.lang.Exception>
RrunSafely(ExceptionUtil.Block<R,E1,E2,E3> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, java.lang.Class<? extends E1> e1Class, java.lang.Class<? extends E2> e2Class, java.lang.Class<? extends E3> e3Class)
static <R,E1 extends java.lang.Exception,E2 extends java.lang.Exception>
RrunSafely(ExceptionUtil.Block<R,E1,E2,java.lang.RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, java.lang.Class<? extends E1> e1Class, java.lang.Class<? extends E2> e2Class)
static <R,E1 extends java.lang.Exception>
RrunSafely(ExceptionUtil.Block<R,E1,java.lang.RuntimeException,java.lang.RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, java.lang.Class<? extends E1> e1Class)
static <R> R
runSafely(ExceptionUtil.Block<R,java.lang.RuntimeException,java.lang.RuntimeException,java.lang.RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock)
-
-
-
Method Detail
-
castAndThrow
public static <E extends java.lang.Exception> void castAndThrow(java.lang.Throwable exception, java.lang.Class<E> exceptionClass) throws E extends java.lang.Exception
- Throws:
E extends java.lang.Exception
-
runSafely
public static <R> R runSafely(ExceptionUtil.Block<R,java.lang.RuntimeException,java.lang.RuntimeException,java.lang.RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock)
-
runSafely
public static <R,E1 extends java.lang.Exception> R runSafely(ExceptionUtil.Block<R,E1,java.lang.RuntimeException,java.lang.RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, java.lang.Class<? extends E1> e1Class) throws E1 extends java.lang.Exception
- Throws:
E1 extends java.lang.Exception
-
runSafely
public static <R,E1 extends java.lang.Exception,E2 extends java.lang.Exception> R runSafely(ExceptionUtil.Block<R,E1,E2,java.lang.RuntimeException> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, java.lang.Class<? extends E1> e1Class, java.lang.Class<? extends E2> e2Class) throws E1 extends java.lang.Exception, E2 extends java.lang.Exception
- Throws:
E1 extends java.lang.Exception
-
runSafely
public static <R,E1 extends java.lang.Exception,E2 extends java.lang.Exception,E3 extends java.lang.Exception> R runSafely(ExceptionUtil.Block<R,E1,E2,E3> block, ExceptionUtil.CatchBlock catchBlock, ExceptionUtil.FinallyBlock finallyBlock, java.lang.Class<? extends E1> e1Class, java.lang.Class<? extends E2> e2Class, java.lang.Class<? extends E3> e3Class) throws E1 extends java.lang.Exception, E2 extends java.lang.Exception, E3 extends java.lang.Exception
- Throws:
E1 extends java.lang.Exception
-
-