< Summary - AsyncResponse (Release / net8.0+net10.0 / unit+integration)

Information
Class: AsyncResponse.DurableFlowInterruptedException
Assembly: AsyncResponse.Abstractions
File(s): /_/src/AsyncResponse.Abstractions/DurableFlowInterruptedException.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 35
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
.ctor(...)100%11100%

File(s)

/_/src/AsyncResponse.Abstractions/DurableFlowInterruptedException.cs

#LineLine coverage
 1namespace AsyncResponse;
 2
 3/// <summary>
 4/// Thrown out of an <see cref="IDurableFlowContext"/> call when <em>this execution attempt</em> of
 5/// a flow was interrupted — not when the step, or the run, failed:
 6/// <list type="bullet">
 7/// <item>the run parked (a durable timer or a child flow suspended it; its wake-up is already
 8/// published and the next delivery replays from the checkpoints);</item>
 9/// <item>the host is stopping while the run was parked in process on a timer or an awaited
 10/// response (the delivery is handed back to the worker transport and redelivered after the
 11/// restart; the step's checkpoint is left untouched, so the replay waits out the remainder or
 12/// re-attaches to the same correlation id).</item>
 13/// </list>
 14/// <para>
 15/// Nothing went wrong with the work, so flow code must let it propagate: a catch-all that treats
 16/// it as a step failure runs compensation — or throws <see cref="DurableFlowFailedException"/> and
 17/// terminally fails the run — because of a deploy. It derives from
 18/// <see cref="OperationCanceledException"/>, so the usual
 19/// <c>catch (Exception ex) when (ex is not OperationCanceledException)</c> filter already excludes
 20/// it, together with the caller-token cancellations that mean the same thing ("stop this
 21/// execution", never "the step failed").
 22/// </para>
 23/// </summary>
 24public class DurableFlowInterruptedException : OperationCanceledException
 25{
 26    /// <summary>Creates the exception with an operator-facing message.</summary>
 20827    public DurableFlowInterruptedException(string message) : base(message)
 28    {
 20829    }
 30
 31    /// <summary>Creates the exception wrapping the cancellation (or other signal) that interrupted the attempt.</summar
 432    public DurableFlowInterruptedException(string message, Exception? innerException) : base(message, innerException)
 33    {
 434    }
 35}