Skip to content

StageValidationException

NexusLabs.Needlr.AgentFramework.Workflows

NexusLabs.Needlr.AgentFramework.Workflows.Sequential

StageValidationException Class

Thrown when a pipeline stage exhausts all retry attempts and still fails post-validation.

public sealed class StageValidationException : System.Exception

Inheritance System.Object 🡒 System.Exception 🡒 StageValidationException

Example

try
{
    var result = await runner.RunAsync(workspace, stages, options, ct);
}
catch (StageValidationException ex)
{
    Console.WriteLine($"Stage '{ex.StageName}' failed: {ex.ValidationError}");
}

Constructors

StageValidationException(string, string) Constructor

Initializes a new StageValidationException.

public StageValidationException(string stageName, string validationError);

Parameters

stageName System.String

The name of the stage that failed validation.

validationError System.String

The error message from the post-validation function.

Properties

StageValidationException.StageName Property

Gets the name of the stage that failed validation.

public string StageName { get; }

Property Value

System.String

StageValidationException.ValidationError Property

Gets the validation error message from the last failed attempt.

public string ValidationError { get; }

Property Value

System.String