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
sourceErrorSourceThe pipeline stage that produced the error.
symbolstringThe option name for option errors, or the command key for command-level errors.
messagestringA user-facing description of the error.
exceptionExceptionThe 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
Message
A user-facing description of the error.
public string Message { get; }
Property Value
Source
The pipeline stage that produced this error.
public ErrorSource Source { get; }
Property Value
Symbol
The option name for option errors, or the command key for command-level errors.
public string Symbol { get; }