Class Error

Namespace
REslava.Result
Assembly
REslava.Result.dll
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

message string

Description of the error.

Error(string, ImmutableDictionary<string, object>)

protected Error(string message, ImmutableDictionary<string, object> tags)

Parameters

message string
tags ImmutableDictionary<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

message string
tags ImmutableDictionary<string, object>

Returns

Error

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

tags (string key, object value)[]

The tags to add to the error.

Returns

Error

A new error instance with the added tags.