File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,17 +134,24 @@ public override void HandleAddedToManager(PluginManager manager)
134134 continue ;
135135 }
136136
137- List < MethodInfo > harmonyMethods = HarmonyInstance . CreateClassProcessor ( nestedType ) ? . Patch ( ) ;
138-
139- if ( harmonyMethods == null || harmonyMethods . Count == 0 )
137+ try
140138 {
141- Interface . Oxide . LogWarning ( $ "[{ Title } ] AutoPatch attribute found on '{ nestedType . Name } ' but no HarmonyPatch methods found. Skipping.") ;
142- continue ;
143- }
139+ List < MethodInfo > harmonyMethods = HarmonyInstance . CreateClassProcessor ( nestedType ) ? . Patch ( ) ;
144140
145- foreach ( MethodInfo method in harmonyMethods )
141+ if ( harmonyMethods == null || harmonyMethods . Count == 0 )
142+ {
143+ Interface . Oxide . LogWarning ( $ "[{ Title } ] AutoPatch attribute found on '{ nestedType . Name } ' but no HarmonyPatch methods found. Skipping.") ;
144+ continue ;
145+ }
146+
147+ foreach ( MethodInfo method in harmonyMethods )
148+ {
149+ Interface . Oxide . LogInfo ( $ "[{ Title } ] Automatically Harmony patched '{ method . Name } ' method. ({ nestedType . Name } )") ;
150+ }
151+ }
152+ catch ( Exception ex )
146153 {
147- Interface . Oxide . LogInfo ( $ "[{ Title } ] Automatically Harmony patched '{ method . Name } ' method. ( { nestedType . Name } )" ) ;
154+ Interface . Oxide . LogException ( $ "[{ Title } ] Failed to automatically Harmony patch '{ nestedType . Name } '" , ex ) ;
148155 }
149156 }
150157
You can’t perform that action at this time.
0 commit comments