Skip to content

ExperimentFailure

NexusLabs.Foundry.Evaluation

NexusLabs.Foundry.Evaluation.Experiments

ExperimentFailure Class

Provides stable machine-actionable failure data without retaining a raw exception or stack.

public sealed record ExperimentFailure : System.IEquatable<NexusLabs.Foundry.Evaluation.Experiments.ExperimentFailure>

Inheritance System.Object 🡒 ExperimentFailure

Implements System.IEquatable<ExperimentFailure>

Constructors

ExperimentFailure(ExperimentFailureCode, ExperimentFailureStage, string, string, bool) Constructor

Initializes a validated structured failure.

public ExperimentFailure(NexusLabs.Foundry.Evaluation.Experiments.ExperimentFailureCode code, NexusLabs.Foundry.Evaluation.Experiments.ExperimentFailureStage stage, string exceptionType, string message, bool isRetryable);

Parameters

code ExperimentFailureCode

The stable failure code.

stage ExperimentFailureStage

The stage that produced the failure.

exceptionType System.String

The originating exception type name.

message System.String

The exception message. An empty message is permitted.

isRetryable System.Boolean

A value indicating whether the active retry policy selected another attempt after this failure.

Exceptions

System.ArgumentOutOfRangeException
code or stage is not a defined enumeration value.

System.ArgumentException
exceptionType is null, empty, or white space.

System.ArgumentNullException
message is null.

Properties

ExperimentFailure.Code Property

Gets the stable failure code.

public NexusLabs.Foundry.Evaluation.Experiments.ExperimentFailureCode Code { get; }

Property Value

ExperimentFailureCode

ExperimentFailure.ExceptionType Property

Gets the originating exception type name.

public string ExceptionType { get; }

Property Value

System.String

ExperimentFailure.IsRetryable Property

Gets a value indicating whether the active retry policy selected another attempt after this failure.

public bool IsRetryable { get; }

Property Value

System.Boolean

ExperimentFailure.Message Property

Gets the exception message.

public string Message { get; }

Property Value

System.String

ExperimentFailure.Stage Property

Gets the stage that produced the failure.

public NexusLabs.Foundry.Evaluation.Experiments.ExperimentFailureStage Stage { get; }

Property Value

ExperimentFailureStage