MCPcopy Create free account
hub / github.com/apache/calcite / throwAsRuntime

Method throwAsRuntime

core/src/main/java/org/apache/calcite/util/Util.java:1054–1058  ·  view source on GitHub ↗

This method rethrows input throwable as is (if its unchecked) or wraps it with RuntimeException and throws. The typical usage would be throw throwAsRuntime(...), where throw statement is needed so Java compiler knows the execution stops at that line. @param throwable inp

(Throwable throwable)

Source from the content-addressed store, hash-verified

1052 * @return the method never returns, it always throws an unchecked exception
1053 */
1054 @API(since = "1.26", status = API.Status.EXPERIMENTAL)
1055 public static RuntimeException throwAsRuntime(Throwable throwable) {
1056 Throwables.throwIfUnchecked(throwable);
1057 throw new RuntimeException(throwable);
1058 }
1059
1060 /**
1061 * This method rethrows input throwable as is (if its unchecked) with an extra

Callers 15

closeMethod · 0.95
returnsRowsMethod · 0.95
testInterpretSemiJoinMethod · 0.95
runMethod · 0.95
createMethod · 0.95
getOperatorTableMethod · 0.95
setMethod · 0.95
getMethod · 0.95
addMethod · 0.95
addAllMethod · 0.95
initMethod · 0.95
cardinalityMethod · 0.95

Calls 1

throwIfUncheckedMethod · 0.80

Tested by 5

returnsRowsMethod · 0.76
testInterpretSemiJoinMethod · 0.76
flushDocMethod · 0.76
populateMethod · 0.76
getRowTypeMethod · 0.76