.NETAPI reference
Errors
Errors in the .NET SDK.
ErrorsResource
classclass Inverge.Nexus.Resources.ErrorsResourceError monitoring — report exceptions and error conditions.
Fingerprint()
static methodstatic string Fingerprint(Exception exception)A stable grouping key: the exception type plus the deepest frame that threw.
Use it when two genuinely different failures share a message, or when a message varies per request and would otherwise create an issue per call.
Parameters
Prop
Type
Returns string
StackFrames()
static methodstatic IReadOnlyList<NexusStackFrame> StackFrames(Exception exception, int limit = 100)Normalised stack frames for an exception, innermost first — the order the console reads, so the first line is where it broke.
Parameters
Prop
Type
Returns IReadOnlyList<NexusStackFrame>
CaptureAsync()
methodTask<ErrorCaptureResult> CaptureAsync(string message, string? type = null, string? level = null, bool? handled = null, string? fingerprint = null, IEnumerable<NexusStackFrame>? stack = null, object? errorContext = null, NexusTelemetryContext? context = null, CancellationToken cancellationToken = default)Reports an error by message.
Parameters
Prop
Type
Returns Task<ErrorCaptureResult>
CaptureExceptionAsync()
methodTask<ErrorCaptureResult> CaptureExceptionAsync(Exception exception, bool handled = true, string? level = "error", string? fingerprint = null, bool includeInner = true, object? errorContext = null, NexusTelemetryContext? context = null, CancellationToken cancellationToken = default)Reports a caught exception, with its type, message and stack.
try { await ChargeAsync(order); }
catch (PaymentException ex)
{
await nexus.Errors.CaptureExceptionAsync(ex, errorContext: new { order = order.Id });
}Parameters
Prop
Type
Returns Task<ErrorCaptureResult>
