Package com.arjuna.ats.jta.cdi
Class SneakyThrow
- java.lang.Object
-
- com.arjuna.ats.jta.cdi.SneakyThrow
-
public class SneakyThrow extends java.lang.ObjectAn utility class which makes possible to throw any exception as aRuntimeException. It means to throw checked exception (subtype of Throwable or Exception) as un-checked exception. This considers the Java 8 inference rule that states that athrows Eis inferred asRuntimeException.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E extends java.lang.Throwable>
voidsneakyThrow(java.lang.Throwable e)This method can be used inthrowstatement such as:throw sneakyThrow(exception);.
-