Class Error
public class Error : Reason<Error>, IError, IReason
- Inheritance
-
Error
- Implements
- Inherited Members
- Extension Methods
Constructors
Error(string)
Creates an error reason with a specific message.
public Error(string message)
Parameters
messagestringDescription of the error.
Error(string, ImmutableDictionary<string, object>)
protected Error(string message, ImmutableDictionary<string, object> tags)
Parameters
messagestringtagsImmutableDictionary<string, object>
Methods
CreateNew(string, ImmutableDictionary<string, object>)
Factory method for creating new instances (maintains immutability). Must be implemented by derived classes.
protected override Error CreateNew(string message, ImmutableDictionary<string, object> tags)
Parameters
messagestringtagsImmutableDictionary<string, object>
Returns
WithTags(params (string key, object value)[])
Creates a new error with additional tags. Error tags must not be null to ensure proper error tracking.
public Error WithTags(params (string key, object value)[] tags)
Parameters
Returns
- Error
A new error instance with the added tags.