Skip to content

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>

object ← ErrorSnapshot

IEquatable<ErrorSnapshot>

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

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)

Code string

Message string

ExceptionType string?

StackTrace string?

public string Code { get; init; }

string

public string? ExceptionType { get; init; }

string?

public string Message { get; init; }

string

public string? StackTrace { get; init; }

string?

Snapshot of a failure Error.

public static ErrorSnapshot FromError(Error error)

error Error

ErrorSnapshot

Snapshot of an exception thrown during dispatch.

public static ErrorSnapshot FromException(Exception exception)

exception Exception

ErrorSnapshot