Table of Contents

Struct ComAsyncException

Namespace
Hi3Helper.Plugin.Core
Assembly
Hi3Helper.Plugin.Core.dll

This struct is used to store the exception information invoked from the plugin's asynchronous methods.

public struct ComAsyncException : IDisposable
Implements
Inherited Members
Extension Methods

Constructors

ComAsyncException()

This struct is used to store the exception information invoked from the plugin's asynchronous methods.

public ComAsyncException()

Fields

ExExceptionInfoSeparator

public const char ExExceptionInfoSeparator = '$'

Field Value

char

ExceptionInfo

Exception Type Info. This stores some information which is required to parse the exception.

public byte* ExceptionInfo

Field Value

byte*

ExceptionMessage

Exception Message.

public byte* ExceptionMessage

Field Value

byte*

ExceptionStackTrace

Exception Stack Trace (Remote Stack Trace from the Plugin).

public byte* ExceptionStackTrace

Field Value

byte*

ExceptionTypeByName

Exception Type Name (without namespace). For example: "InvalidOperationException"

public byte* ExceptionTypeByName

Field Value

byte*

Methods

Create(string?, string?, string?, string?)

Create an unmanaged instance of ComAsyncException struct from specified strings.

public static ComAsyncException Create(string? typeByName, string? info, string? message, string? stackTrace)

Parameters

typeByName string

Exception Type Name (without namespace). For example: "InvalidOperationException"

info string

Exception Type Info. This stores some information which is required to parse the exception.

message string

Exception Message.

stackTrace string

Exception Stack Trace (Remote Stack Trace from the Plugin).

Returns

ComAsyncException

An instance of ComAsyncException

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetExceptionFromHandle(PluginDisposableMemory<ComAsyncException>)

Gets the exception from the span handle.

public static Exception? GetExceptionFromHandle(PluginDisposableMemory<ComAsyncException> exceptionMemory)

Parameters

exceptionMemory PluginDisposableMemory<ComAsyncException>

The span handle in which stores the ComAsyncException struct.

Returns

Exception

Nullable Exception instance. Returns null if no exception is being found.

Write(string?, string?, string?, string?)

Write the exception data to the current struct instance.

public void Write(string? typeByName, string? info, string? message, string? stackTrace)

Parameters

typeByName string

Exception Type Name (without namespace). For example: "InvalidOperationException"

info string

Exception Type Info. This stores some information which is required to parse the exception.

message string

Exception Message.

stackTrace string

Exception Stack Trace (Remote Stack Trace from the Plugin).