Class Mechanism
Sentry Exception Mechanism
Inherited Members
Namespace: Sentry.Protocol
Assembly: Sentry.Protocol.dll
Syntax
[DataContract]
public class Mechanism
Remarks
The exception mechanism is an optional field residing in the Exception Interface. It carries additional information about the way the exception was created on the target system. This includes general exception values obtained from operating system or runtime APIs, as well as mechanism-specific values.
Properties
| Improve this Doc View SourceData
Arbitrary extra data that might help the user understand the error thrown by this mechanism
Declaration
public IDictionary<string, object> Data { get; }
Property Value
Type | Description |
---|---|
IDictionary<String, Object> |
Description
Optional human readable description of the error mechanism and a possible hint on how to solve this error
Declaration
[DataMember(Name = "description", EmitDefaultValue = false)]
public string Description { get; set; }
Property Value
Type | Description |
---|---|
String |
Handled
Optional flag indicating whether the exception has been handled by the user (e.g. via try..catch)
Declaration
[DataMember(Name = "handled", EmitDefaultValue = false)]
public bool? Handled { get; set; }
Property Value
Type | Description |
---|---|
Nullable<Boolean> |
HelpLink
Optional fully qualified URL to an online help resource, possible interpolated with error parameters
Declaration
[DataMember(Name = "help_link", EmitDefaultValue = false)]
public string HelpLink { get; set; }
Property Value
Type | Description |
---|---|
String |
Meta
Optional information from the operating system or runtime on the exception mechanism
Declaration
public IDictionary<string, object> Meta { get; }
Property Value
Type | Description |
---|---|
IDictionary<String, Object> |
Remarks
The mechanism meta data usually carries error codes reported by the runtime or operating system, along with a platform dependent interpretation of these codes. SDKs can safely omit code names and descriptions for well known error codes, as it will be filled out by Sentry. For proprietary or vendor-specific error codes, adding these values will give additional information to the user.
Type
Required unique identifier of this mechanism determining rendering and processing of the mechanism data
Declaration
[DataMember(Name = "type", EmitDefaultValue = false)]
public string Type { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
The type attribute is required to send any exception mechanism attribute, even if the SDK cannot determine the specific mechanism. In this case, set the type to "generic". See below for an example.