MCPcopy Index your code
hub / github.com/clojure/clojure / sneakyThrow

Method sneakyThrow

src/jvm/clojure/lang/Util.java:234–240  ·  view source on GitHub ↗

Throw even checked exceptions without being required to declare them or catch them. Suggested idiom: throw sneakyThrow( some exception );

(Throwable t)

Source from the content-addressed store, hash-verified

232 * <code>throw sneakyThrow( some exception );</code>
233 */
234static public RuntimeException sneakyThrow(Throwable t) {
235 // http://www.mail-archive.com/javaposse@googlegroups.com/msg05984.html
236 if (t == null)
237 throw new NullPointerException();
238 Util.<RuntimeException>sneakyThrow0(t);
239 return null;
240}
241
242@SuppressWarnings("unchecked")
243static private <T extends Throwable> void sneakyThrow0(Throwable t) throws T {

Callers 15

loadMethod · 0.95
derefMethod · 0.95
StaticFieldExprMethod · 0.95
maybeEmitFIAdapterMethod · 0.95
emitTypedArgsMethod · 0.95
evalMethod · 0.95
parseMethod · 0.95
evalMethod · 0.95
maybeResolveInMethod · 0.95
buildMethod · 0.95
unreadMethod · 0.95

Calls 1

sneakyThrow0Method · 0.95

Tested by

no test coverage detected