Language

ResilientTaskException Class

Definition

The single exception type raised by the resilient-task framework. The ErrorCode identifies the failure category; code-specific data is exposed through nullable properties (CurrentStatus, ActualLastInputId, Failure) that are populated only for the corresponding code.

public sealed class ResilientTaskException : Exception
type ResilientTaskException = class
    inherit Exception
Public NotInheritable Class ResilientTaskException
Inherits Exception
Inheritance
ResilientTaskException

Remarks

Catch this single type to handle any task-framework protocol failure. Argument validation surfaces as ArgumentException and cancellation as OperationCanceledException; recovery deferral is an internal lifecycle handoff and is never surfaced as an exception.

Constructors

Name Description
ResilientTaskException(ResilientTaskErrorCode, String, Exception)

Initializes a new instance of the ResilientTaskException class.

Properties

Name Description
ActualLastInputId

For PreconditionFailed, the task's actual last input id when known; otherwise null.

CurrentStatus

For Conflict, the task status the store reported at the time of the conflict; otherwise null.

ErrorCode

The failure category.

Failure

For HandlerError and ExhaustedRetries, the structured failure detail; otherwise null. The original handler exception (when available) is also preserved as InnerException.

Applies to