Package com.microsoft.durabletask
Class TaskFailedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.microsoft.durabletask.TaskFailedException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
TaskCanceledException
public class TaskFailedException extends java.lang.RuntimeExceptionException that gets thrown when awaiting aTaskfor 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 FailureDetailsgetErrorDetails()Gets the details of the task failure, including exception information.intgetTaskId()Gets the ID of the failed task.java.lang.StringgetTaskName()Gets the name of the failed task.
-
-
-
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
-
-