Table of Contents

Class Error

Namespace
Albatross.CommandLine
Assembly
Albatross.CommandLine.dll

An error condition raised during command execution, tagged with the ErrorSource that produced it and the option name or command key it relates to. May or may not carry an underlying Exception.

public record Error : IEquatable<Error>
Inheritance
Error
Implements
Inherited Members

Constructors

Error(ErrorSource, string, string, Exception?)

Creates an error.

public Error(ErrorSource source, string symbol, string message, Exception? exception)

Parameters

source ErrorSource

The pipeline stage that produced the error.

symbol string

The option name for option errors, or the command key for command-level errors.

message string

A user-facing description of the error.

exception Exception

The exception that caused the error, or null if none.

Properties

Exception

The exception that caused this error, or null when the error did not originate from one.

public Exception? Exception { get; }

Property Value

Exception

Message

A user-facing description of the error.

public string Message { get; }

Property Value

string

Source

The pipeline stage that produced this error.

public ErrorSource Source { get; }

Property Value

ErrorSource

Symbol

The option name for option errors, or the command key for command-level errors.

public string Symbol { get; }

Property Value

string