Table of Contents

Struct ExceptionHandlerResult

Namespace
Echo.Platforms.AsmResolver.Emulation.Stack
Assembly
Echo.Platforms.AsmResolver.dll

Provides a discriminated union describing the result of an exception handler operation, containing either the next offset to jump to, or a handle to an unhandled exception object.

public readonly struct ExceptionHandlerResult
Inherited Members

Properties

ExceptionObject

When IsSuccess is false, contains the handle to the unhandled exception that was thrown.

public ObjectHandle ExceptionObject { get; }

Property Value

ObjectHandle

IsSuccess

Gets a value indicating whether the handler operation was successful.

public bool IsSuccess { get; }

Property Value

bool

NextOffset

When IsSuccess is true, contains the next IL offset to jump to within the current method.

public int NextOffset { get; }

Property Value

int

Methods

Exception(ObjectHandle)

Constructs a new unsuccessful exception handler result.

public static ExceptionHandlerResult Exception(ObjectHandle exceptionObject)

Parameters

exceptionObject ObjectHandle

The handle to the unhandled exception that was thrown.

Returns

ExceptionHandlerResult

The result.

Success(int)

Constructs a new successful exception handler result.

public static ExceptionHandlerResult Success(int offset)

Parameters

offset int

The next IL offset to jump to.

Returns

ExceptionHandlerResult

The result.