ErrorSnapshot class
Namespace: Vitreous.DevUI.Tracing
Assembly: Vitreous.DevUI.dll
A snapshot of an Error or exception that is safe to serialize. ExceptionType and StackTrace are set when an exception is involved: thrown by the pipeline, or attached to the error (see Exception).
public sealed record ErrorSnapshot : IEquatable<ErrorSnapshot>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”ErrorSnapshot(string, string, string?, string?)
Section titled “ ErrorSnapshot(string, string, string?, string?)”A snapshot of an Error or exception that is safe to serialize. ExceptionType and StackTrace are set when an exception is involved: thrown by the pipeline, or attached to the error (see Exception).
public ErrorSnapshot(string Code, string Message, string? ExceptionType = null, string? StackTrace = null)Parameters
Section titled “Parameters”Code string
Message string
ExceptionType string?
StackTrace string?
Properties
Section titled “Properties”public string Code { get; init; }Property Value
Section titled “Property Value”ExceptionType
Section titled “ ExceptionType”public string? ExceptionType { get; init; }Property Value
Section titled “Property Value”Message
Section titled “ Message”public string Message { get; init; }Property Value
Section titled “Property Value”StackTrace
Section titled “ StackTrace”public string? StackTrace { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”FromError(Error)
Section titled “ FromError(Error)”Snapshot of a failure Error.
public static ErrorSnapshot FromError(Error error)Parameters
Section titled “Parameters”error Error
Returns
Section titled “Returns”FromException(Exception)
Section titled “ FromException(Exception)”Snapshot of an exception thrown during dispatch.
public static ErrorSnapshot FromException(Exception exception)Parameters
Section titled “Parameters”exception Exception