Class SneakyThrow

java.lang.Object
io.smallrye.faulttolerance.core.util.SneakyThrow

public class SneakyThrow extends Object
  • Method Details

    • sneakyThrow

      public static <E extends Throwable> RuntimeException sneakyThrow(Throwable e) throws E
      This method can and should be used as part of a 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.
      Throws:
      E