MCPcopy
hub / github.com/google/guava / rethrow

Method rethrow

android/guava/src/com/google/common/io/Closer.java:130–136  ·  view source on GitHub ↗

Stores the given throwable and rethrows it. It will be rethrown as is if it is an {@code IOException}, {@code RuntimeException} or {@code Error}. Otherwise, it will be rethrown wrapped in a {@code RuntimeException}. <b>Note:</b> Be sure to declare all of the checked exception types your try block ca

(Throwable e)

Source from the content-addressed store, hash-verified

128 * @throws IOException when the given throwable is an IOException
129 */
130 public RuntimeException rethrow(Throwable e) throws IOException {
131 checkNotNull(e);
132 thrown = e;
133 throwIfInstanceOf(e, IOException.class);
134 throwIfUnchecked(e);
135 throw new RuntimeException(e);
136 }
137
138 /**
139 * Stores the given throwable and rethrows it. It will be rethrown as is if it is an {@code

Callers 15

isEmptyMethod · 0.95
sizeMethod · 0.95
copyToMethod · 0.95
readMethod · 0.95
contentEqualsMethod · 0.95
sliceStreamMethod · 0.95
readMethod · 0.95
mapInternalMethod · 0.95
lengthMethod · 0.95
copyToMethod · 0.95
readMethod · 0.95
readFirstLineMethod · 0.95

Calls 3

checkNotNullMethod · 0.45
throwIfInstanceOfMethod · 0.45
throwIfUncheckedMethod · 0.45