< Summary

Information
Class: NexusLabs.Needlr.AgentFramework.Workflows.Sequential.StageValidationException
Assembly: NexusLabs.Needlr.AgentFramework.Workflows
File(s): /home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework.Workflows/Sequential/StageValidationException.cs
Line coverage
100%
Covered lines: 6
Uncovered lines: 0
Coverable lines: 6
Total lines: 38
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
get_StageName()100%11100%
get_ValidationError()100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/needlr/needlr/src/NexusLabs.Needlr.AgentFramework.Workflows/Sequential/StageValidationException.cs

#LineLine coverage
 1namespace NexusLabs.Needlr.AgentFramework.Workflows.Sequential;
 2
 3/// <summary>
 4/// Thrown when a pipeline stage exhausts all retry attempts and still fails
 5/// post-validation.
 6/// </summary>
 7/// <example>
 8/// <code>
 9/// try
 10/// {
 11///     var result = await runner.RunAsync(workspace, stages, options, ct);
 12/// }
 13/// catch (StageValidationException ex)
 14/// {
 15///     Console.WriteLine($"Stage '{ex.StageName}' failed: {ex.ValidationError}");
 16/// }
 17/// </code>
 18/// </example>
 19public sealed class StageValidationException : Exception
 20{
 21    /// <summary>Gets the name of the stage that failed validation.</summary>
 122    public string StageName { get; }
 23
 24    /// <summary>Gets the validation error message from the last failed attempt.</summary>
 125    public string ValidationError { get; }
 26
 27    /// <summary>
 28    /// Initializes a new <see cref="StageValidationException"/>.
 29    /// </summary>
 30    /// <param name="stageName">The name of the stage that failed validation.</param>
 31    /// <param name="validationError">The error message from the post-validation function.</param>
 32    public StageValidationException(string stageName, string validationError)
 133        : base($"Stage '{stageName}' failed post-validation: {validationError}")
 34    {
 135        StageName = stageName;
 136        ValidationError = validationError;
 137    }
 38}