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
[Serializable]
public class HarmonyException : Exception, ISerializable, _Exception
Constructors
| Improve this Doc View SourceHarmonyException(SerializationInfo, StreamingContext)
Default serialization constructor (not implemented)
Declaration
protected HarmonyException(SerializationInfo serializationInfo, StreamingContext streamingContext)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.SerializationInfo | serializationInfo | The info |
System.Runtime.Serialization.StreamingContext | streamingContext | The context |
Methods
| Improve this Doc View SourceGetErrorIndex()
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 |