Table of Contents

Extract Method

Definition

Namespace
Cuemon.Diagnostics
Assemblies
Cuemon.Core.dll
Source
src/Cuemon.Core/Diagnostics/ExceptionDescriptor.cs

Extract(Exception, string, string, Uri)

Converts the specified exception to a developer friendly ExceptionDescriptor.

public static ExceptionDescriptor Extract(Exception exception, string code = "UnhandledException", string message = "An unhandled exception occurred.", Uri helpLink = null)

Parameters

exception Exception

The Exception to convert.

code string

The error code that uniquely identifies the type of failure. Default is "UnhandledException".

message string

The message that explains the reason for the failure. Default is "An unhandled exception occurred.".

helpLink Uri

The optional link to a help page associated with this failure.

Returns

ExceptionDescriptor

An ExceptionDescriptor initialized with the provided arguments, and (if embedded) enriched with insights of the exception.

Remarks

Any meta data embedded by Embed<T>(T, object[], SystemSnapshots) will be extracted and added as evidence to the final result.