Package akka.javasdk.agent.task
Class TaskException
Object
Throwable
Exception
RuntimeException
akka.javasdk.agent.task.TaskException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TaskException.Cancelled,TaskException.Failed,TaskException.ResultRejected,TaskException.TypeMismatch
public abstract sealed class TaskException
extends RuntimeException
permits TaskException.ResultRejected, TaskException.Failed, TaskException.Cancelled, TaskException.TypeMismatch
Base exception for task terminal states. Thrown by
TaskClient.resultAsync(akka.javasdk.agent.task.TaskDefinition<R>) when a task reaches a non-successful terminal state.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThrown when a task reaches theTaskStatus.CANCELLEDstate.static final classThrown when a task reaches theTaskStatus.FAILEDstate.static final classThrown when a task result is rejected by a validation rule.static final classThrown when a task result is retrieved with a mismatched task definition. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
taskId
The ID of the task that failed or was cancelled. -
reason
The reason the task failed or was cancelled.
-