Class HarmonyException +
+HarmonyException wraps IL compile errors (only mono) containing detailed information about the failure
+Inheritance
+Implements
+Inherited Members
+Namespace: HarmonyLib
+Assembly: 0Harmony.dll
+Syntax
+[Serializable]
+public class HarmonyException : Exception, ISerializable, _Exception
+ Constructors +
+ + | + Improve this Doc + + + View Source + + +HarmonyException(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 Source + + +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> | ++ |
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>> | ++ |