Package io.dapr.durabletask
Class TaskFailedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.dapr.durabletask.TaskFailedException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TaskCanceledException
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:
-
Method Summary
Modifier and TypeMethodDescriptionGets the details of the task failure, including exception information.intGets the ID of the failed task.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
-
Method Details
-
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
Gets the name of the failed task.- Returns:
- the name of the failed task
-
getErrorDetails
Gets the details of the task failure, including exception information.- Returns:
- the details of the task failure
-