< Summary

Information
Class: Elsa.Bpmn.Exceptions.BpmnScopeFaultException
Assembly: Elsa.Bpmn
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Bpmn/Exceptions/BpmnScopeFaultException.cs
Line coverage
75%
Covered lines: 3
Uncovered lines: 1
Coverable lines: 4
Total lines: 29
Line coverage: 75%
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%
get_Code()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Bpmn/Exceptions/BpmnScopeFaultException.cs

#LineLine coverage
 1namespace 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>
 13public 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>
 120    public BpmnScopeFaultException(string code, string message) : base($"{code}: {message}")
 21    {
 122        Code = code;
 123    }
 24
 25    /// <summary>
 26    /// The interpreter's stable fault code.
 27    /// </summary>
 028    public string Code { get; }
 29}