Class TaskFailedException

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    TaskCanceledException

    public class TaskFailedException
    extends java.lang.RuntimeException
    Exception that gets thrown when awaiting a Task for an activity or sub-orchestration that fails with an unhandled exception.

    Detailed information associated with a particular task failure can be retrieved using the getErrorDetails() method.

    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FailureDetails getErrorDetails()
      Gets the details of the task failure, including exception information.
      int getTaskId()
      Gets the ID of the failed task.
      java.lang.String getTaskName()
      Gets the name of the failed task.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • getTaskId

        public int getTaskId()
        Gets the ID of the failed task.

        Each durable task (activities, timers, sub-orchestrations, etc.) scheduled by a task orchestrator has an auto-incrementing ID associated with it. This ID is used to distinguish tasks from one another, even if, for example, they are tasks that call the same activity. This ID can therefore be used to more easily correlate a specific task failure to a specific task.

        Returns:
        the ID of the failed task
      • getTaskName

        public java.lang.String getTaskName()
        Gets the name of the failed task.
        Returns:
        the name of the failed task
      • getErrorDetails

        public FailureDetails getErrorDetails()
        Gets the details of the task failure, including exception information.
        Returns:
        the details of the task failure