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
Type | Description |
---|---|
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
Type | Description |
---|---|
System.Int32 | The offset |
GetInstructions()
Get a list of IL instructions without offsets
Declaration
public List<CodeInstruction> GetInstructions()
Returns
Type | Description |
---|---|
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
Type | Description |
---|---|
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.Int32, CodeInstruction>> | A list of key/value pairs which represent an offset and the code at that offset |