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

Method toUnchecked

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

Wraps an exception with RuntimeException and return it. If the exception is already an instance of RuntimeException, returns it directly.

(Exception e)

Source from the content-addressed store, hash-verified

1090 * returns it directly.
1091 */
1092 public static RuntimeException toUnchecked(Exception e) {
1093 if (e instanceof RuntimeException) {
1094 return (RuntimeException) e;
1095 }
1096 if (e instanceof IOException) {
1097 return new UncheckedIOException((IOException) e);
1098 }
1099 return new RuntimeException(e);
1100 }
1101
1102 /**
1103 * Returns cause of the given throwable if it is non-null or the throwable itself.

Callers 15

queryMethod · 0.95
evaluateOperatorMethod · 0.95
moveNextMethod · 0.95
closeMethod · 0.95
evaluateOperatorMethod · 0.95
moveNextMethod · 0.95
closeMethod · 0.95
enumeratorMethod · 0.95
deduceTableMapMethod · 0.95
loadNextArrowBatchMethod · 0.95
createInstanceMethod · 0.95
internalToDateTimeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected