Class ExceptionUtils

java.lang.Object
dev.restate.sdk.core.ExceptionUtils

public final class ExceptionUtils extends Object
  • Method Details

    • unwrapCompletionException

      public static Throwable unwrapCompletionException(Throwable throwable)
      Unwrap the CompletionException/ExecutionException wrappers introduced by the CompletableFuture machinery, returning the underlying cause. The reported error message and stacktrace should reflect the user-thrown exception, not the executor plumbing.
    • sneakyThrow

      public static <E extends Throwable> void sneakyThrow(Throwable e) throws E
      Throws:
      E
    • findProtocolException

      public static Optional<ProtocolException> findProtocolException(Throwable throwable)
    • containsAbortedExecutionException

      public static boolean containsAbortedExecutionException(Throwable throwable)
    • isTerminalException

      public static boolean isTerminalException(Throwable throwable)