Class SneakyThrow
- java.lang.Object
-
- io.smallrye.faulttolerance.core.util.SneakyThrow
-
public class SneakyThrow extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E extends Throwable>
RuntimeExceptionsneakyThrow(Throwable e)This method can and should be used as part of athrowstatement, such as:throw sneakyThrow(exception);.
-
-
-
Method Detail
-
sneakyThrow
public static <E extends Throwable> RuntimeException sneakyThrow(Throwable e) throws E extends Throwable
This method can and should be used as part of athrowstatement, 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.- Throws:
E extends Throwable
-
-