Class
ContextError<TError>
class ContextError<TError> where TError: IError
Namespace: System
Assembly: Raven.Core.dll
Source file: Error.rvn
Inheritance: Object → ContextError<TError>
Implements: IEquatable<ContextError<TError>>, IError
Adds contextual information around an existing main error.
The contextual message describes the current operation. Cause preserves
the underlying typed error so explicit error propagation does not erase the
original failure.
Type parameters
| Name | Description |
|---|---|
TError |
The type of the underlying error. |
Constructors
1 item
ContextError(Message: string, Cause: TError)
Adds contextual information around an existing main error.
Properties
2 items
Cause: TError
Gets the underlying error.
Message: string
Gets the contextual error message.
Implements IError.Message
Methods
9 items
Extension member:
Box(message: string) -> ContextError<IError>
Boxes this error in a contextual error with the specified message.
Extension from ErrorObjectExtensions.Box
Deconstruct(Message: out string, Cause: out TError) -> ()
No summary available.
Equals(other: ContextError<TError>) -> bool
Indicates whether the current object is equal to another object of the same type.
Required implementation (no default). Defined by IEquatable<ContextError<TError>>.Equals · Defined by IEquatable<ContextError<TError>>.Equals
Equals(other: ContextError<TError>?) -> bool
No summary available.
Equals(obj: object?) -> bool
No summary available.
Overrides Object.Equals
GetHashCode() -> int
No summary available.
Overrides Object.GetHashCode
GetType() -> Type
Gets the System.Type of the current instance.
Inherited from Object.GetType
ToString() -> string?
Returns the contextual error message.
Overrides Object.ToString
Extension member:
WithContext(message: string) -> ContextError<ContextError<TError>>
Wraps this error with an additional contextual message.
Extension from ErrorExtensions<TError>.WithContext
Operators
3 items
Static member:
operator ==(left: ContextError<TError>?, right: ContextError<TError>?) -> bool
No summary available.
Static extension member:
implicit conversion<T>(value: ContextError<TError>?) -> Optional<ContextError<TError>>
Converts a nullable reference to `Some`, or to `None` when it is `null`.
Extension from OptionalExtensions1<T>.op_Implicit
Static member:
operator !=(left: ContextError<TError>?, right: ContextError<TError>?) -> bool
No summary available.