MCPcopy Create free account
hub / github.com/apache/storm / unwrapTo

Method unwrapTo

storm-client/src/jvm/org/apache/storm/utils/Utils.java:475–483  ·  view source on GitHub ↗
(Class<T> klass, Throwable t)

Source from the content-addressed store, hash-verified

473 }
474
475 public static <T extends Throwable> T unwrapTo(Class<T> klass, Throwable t) {
476 while (t != null) {
477 if (klass.isInstance(t)) {
478 return (T) t;
479 }
480 t = t.getCause();
481 }
482 return null;
483 }
484
485 public static <T extends Throwable> void unwrapAndThrow(Class<T> klass, Throwable t) throws T {
486 T ret = unwrapTo(klass, t);

Callers 2

unwrapAndThrowMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected