public class SneakyThrow extends Object
| Modifier and Type | Method and Description |
|---|---|
static <E extends Throwable> |
sneakyThrow(Throwable e)
This method can and should be used as part of a
throw statement,
such as: throw sneakyThrow(exception);. |
public static <E extends Throwable> RuntimeException sneakyThrow(Throwable e) throws E extends Throwable
throw statement,
such as: throw sneakyThrow(exception);. It is guaranteed to never return normally,
and this style of usage makes sure that the Java compiler is aware of that.E extends ThrowableCopyright © 2018–2020. All rights reserved.