Table of Contents

Class CommonErrorData

Namespace
StreamJsonRpc.Protocol
Assembly
StreamJsonRpc.dll

A class that describes useful data that may be found in the JSON-RPC error message's error.data property.

[DataContract]
[GenerateShape]
public class CommonErrorData
Inheritance
CommonErrorData
Inherited Members

Constructors

CommonErrorData()

Initializes a new instance of the CommonErrorData class.

public CommonErrorData()

CommonErrorData(Exception)

Initializes a new instance of the CommonErrorData class.

public CommonErrorData(Exception copyFrom)

Parameters

copyFrom Exception

The exception to copy error details from.

Properties

HResult

Gets or sets the application error code or HRESULT of the failure.

[DataMember(Order = 3, Name = "code")]
[JsonPropertyName("code")]
[JsonPropertyOrder(3)]
[PropertyShape(Name = "code")]
[Key(3)]
public int HResult { get; set; }

Property Value

int

Inner

Gets or sets the inner error information, if any.

[DataMember(Order = 4, Name = "inner")]
[JsonPropertyName("inner")]
[JsonPropertyOrder(4)]
[PropertyShape(Name = "inner")]
[Key(4)]
public CommonErrorData? Inner { get; set; }

Property Value

CommonErrorData

Message

Gets or sets the message associated with this error.

[DataMember(Order = 1, Name = "message")]
[JsonPropertyName("message")]
[JsonPropertyOrder(1)]
[PropertyShape(Name = "message")]
[Key(1)]
public string? Message { get; set; }

Property Value

string

StackTrace

Gets or sets the stack trace associated with the error.

[DataMember(Order = 2, Name = "stack")]
[JsonPropertyName("stack")]
[JsonPropertyOrder(2)]
[PropertyShape(Name = "stack")]
[Key(2)]
public string? StackTrace { get; set; }

Property Value

string

TypeName

Gets or sets the type of error (e.g. the full type name of the exception thrown).

[DataMember(Order = 0, Name = "type")]
[JsonPropertyName("type")]
[JsonPropertyOrder(0)]
[PropertyShape(Name = "type")]
[Key(0)]
public string? TypeName { get; set; }

Property Value

string