Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions api/src/main/java/org/apache/iceberg/util/ExceptionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ public interface FinallyBlock {
void run() throws Exception;
}

/**
* This function is unused outside of the associated tests in TestExceptionUtil.
* @deprecated since 0.14.0. Will be removed in 1.0.0.
*/
@Deprecated
public static <R> R runSafely(
Block<R, RuntimeException, RuntimeException, RuntimeException> block,
CatchBlock catchBlock,
Expand All @@ -61,6 +66,11 @@ public static <R> R runSafely(
RuntimeException.class, RuntimeException.class, RuntimeException.class);
}

/**
* This function is unused outside of the associated tests in TestExceptionUtil.
* @deprecated since 0.14.0. Will be removed in 1.0.0.
*/
@Deprecated
public static <R, E1 extends Exception> R runSafely(
Block<R, E1, RuntimeException, RuntimeException> block,
CatchBlock catchBlock,
Expand All @@ -69,6 +79,11 @@ public static <R, E1 extends Exception> R runSafely(
return runSafely(block, catchBlock, finallyBlock, e1Class, RuntimeException.class, RuntimeException.class);
}

/**
* This function is unused outside the associated tests in TestExceptionUtil.
* @deprecated since 0.14.0. Will be removed in 1.0.0.
*/
@Deprecated
public static <R, E1 extends Exception, E2 extends Exception> R runSafely(
Block<R, E1, E2, RuntimeException> block,
CatchBlock catchBlock,
Expand All @@ -78,6 +93,12 @@ public static <R, E1 extends Exception, E2 extends Exception> R runSafely(
return runSafely(block, catchBlock, finallyBlock, e1Class, e2Class, RuntimeException.class);
}

/**
* This function is unused outside the associated tests in TestExceptionUtil.
* @deprecated since 0.14.0. Will be removed in 1.0.0.
*/
@Deprecated
@SuppressWarnings("Finally")
public static <R, E1 extends Exception, E2 extends Exception, E3 extends Exception> R runSafely(
Block<R, E1, E2, E3> block,
CatchBlock catchBlock,
Expand Down