| | | 1 | | namespace Elsa.Bpmn.Exceptions; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Thrown when the interpreter returns a <c>Fault</c> continuation for a BPMN scope: the scope failed |
| | | 5 | | /// deterministically and cannot continue. |
| | | 6 | | /// </summary> |
| | | 7 | | /// <remarks> |
| | | 8 | | /// A propagated work fault does not surface this way. That case is handled where it arrives — inside the scope's |
| | | 9 | | /// <see cref="Elsa.Workflows.Signals.FaultSignal"/> handler, which leaves the signal alone so an enclosing scope or |
| | | 10 | | /// the incident strategy takes it. This exception covers the remaining ways a scope can fault, such as a deadlock |
| | | 11 | | /// the interpreter detects while routing a completion, where there is no signal in flight to leave alone. |
| | | 12 | | /// </remarks> |
| | | 13 | | public class BpmnScopeFaultException : Exception |
| | | 14 | | { |
| | | 15 | | /// <summary> |
| | | 16 | | /// Initializes a new instance of the <see cref="BpmnScopeFaultException"/> class. |
| | | 17 | | /// </summary> |
| | | 18 | | /// <param name="code">The interpreter's stable fault code.</param> |
| | | 19 | | /// <param name="message">The interpreter's human-readable explanation.</param> |
| | 1 | 20 | | public BpmnScopeFaultException(string code, string message) : base($"{code}: {message}") |
| | | 21 | | { |
| | 1 | 22 | | Code = code; |
| | 1 | 23 | | } |
| | | 24 | | |
| | | 25 | | /// <summary> |
| | | 26 | | /// The interpreter's stable fault code. |
| | | 27 | | /// </summary> |
| | 0 | 28 | | public string Code { get; } |
| | | 29 | | } |