docs/api/HarmonyLib.HarmonyException.html
Under Mono, HarmonyException wraps IL compile errors with detailed information about the failure
System.Object
System.Exception
HarmonyException
public class HarmonyException : Exception, ISerializable, _Exception
Get the index of the errornous IL instruction
public int GetErrorIndex()
| Type | Description |
|---|---|
| System.Int32 |
The index into the list of instructions or -1 if not found
|
Get the error offset of the errornous IL instruction
public int GetErrorOffset()
| Type | Description |
|---|---|
| System.Int32 |
The offset
|
Get a list of IL instructions without offsets
public List<CodeInstruction> GetInstructions()
| Type | Description |
|---|---|
| System.Collections.Generic.List<CodeInstruction> |
A list of CodeInstruction
|
Get a list of IL instructions in pairs of offset+code
public List<KeyValuePair<int, CodeInstruction>> GetInstructionsWithOffsets()
| Type | Description |
|---|---|
| System.Collections.Generic.List\> |
A list of key/value pairs which represent an offset and the code at that offset
|