Interface Cause

All Known Implementing Classes:
WorkflowError, WorkflowExecutionException

@Internal public interface Cause
Contract describing the cause of a workflow or step failure.
Since:
5.4.0
Author:
Stefan Dragisic
  • Method Details

    • type

      String type()
      Fully-qualified class name of the originating Throwable.
    • message

      String message()
      Message describing the cause, typically Throwable.getMessage().
    • isType

      default boolean isType(Class<? extends Throwable> clazz)
      Returns true when type() matches the fully-qualified name of clazz. Use this instead of instanceof when branching on the originating throwable's class — instanceof does not match because the runtime cause is always WorkflowExecutionException, regardless of the originating type.