Class ExceptionProvider

java.lang.Object
org.ujorm.tools.web.ExceptionProvider

public final class ExceptionProvider extends Object
Author:
Pavel Ponec
  • Method Details

    • catchEx

      public void catchEx(@NotNull @NotNull Consumer<Throwable> exceptionConsumer)
      Apply consumer if the exception is a required type (or not null).
    • catchEx

      public <T extends Throwable> void catchEx(@NotNull @NotNull Class<T> exceptionClass, @NotNull @NotNull Consumer<T> exceptionConsumer)
      Apply consumer if the exception is not null.
    • of

      @NotNull public static @NotNull ExceptionProvider of(@NotNull @NotNull Throwable e)
      A factory method
    • of

      @NotNull public static @NotNull ExceptionProvider of()
      A factory method