Back to Harmony

Class HarmonyException

docs/api/HarmonyLib.HarmonyException.html

2.4.2.01.6 KB
Original Source

Class HarmonyException

Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure

Inheritance

System.Object

System.Exception

HarmonyException

Namespace : HarmonyLib
Assembly : 0Harmony.dll
Syntax
public class HarmonyException : Exception, ISerializable, _Exception

Methods

GetErrorIndex()

Get the index of the errornous IL instruction

Declaration
public int GetErrorIndex()
Returns
TypeDescription
System.Int32

The index into the list of instructions or -1 if not found

|

GetErrorOffset()

Get the error offset of the errornous IL instruction

Declaration
public int GetErrorOffset()
Returns
TypeDescription
System.Int32

The offset

|

GetInstructions()

Get a list of IL instructions without offsets

Declaration
public List<CodeInstruction> GetInstructions()
Returns
TypeDescription
System.Collections.Generic.List<CodeInstruction>

A list of CodeInstruction

|

GetInstructionsWithOffsets()

Get a list of IL instructions in pairs of offset+code

Declaration
public List<KeyValuePair<int, CodeInstruction>> GetInstructionsWithOffsets()
Returns
TypeDescription
System.Collections.Generic.List\>

A list of key/value pairs which represent an offset and the code at that offset

|