File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -80,15 +80,19 @@ private void Awake()
80
80
harmony = new Harmony ( "Shabby" ) ;
81
81
Log . Message ( "Harmony patching" ) ;
82
82
foreach ( var type in Assembly . GetExecutingAssembly ( ) . GetTypes ( ) ) {
83
- PatchClassProcessor processor = new ( harmony , type ) ;
84
- if ( processor . Patch ( ) is not List < MethodInfo > patchedMethods ) continue ;
85
- if ( patchedMethods . Count == 0 ) {
86
- Log . Message ( $ "`{ type . Name } ` skipped") ;
87
- continue ;
83
+ try {
84
+ PatchClassProcessor processor = new ( harmony , type ) ;
85
+ if ( processor . Patch ( ) is not List < MethodInfo > patchedMethods ) continue ;
86
+ if ( patchedMethods . Count == 0 ) {
87
+ Log . Message ( $ "`{ type . Name } ` skipped") ;
88
+ continue ;
89
+ }
90
+
91
+ Log . Message (
92
+ $ "`{ type . Name } ` patched methods { string . Join ( ", " , patchedMethods . Select ( m => $ "`{ m . Name } `") ) } ") ;
93
+ } catch ( Exception e ) {
94
+ Log . Error ( $ "encountered exception while applying `{ type . Name } `:\n { e } ") ;
88
95
}
89
-
90
- Log . Message (
91
- $ "`{ type . Name } ` patched methods { string . Join ( ", " , patchedMethods . Select ( m => $ "`{ m . Name } `") ) } ") ;
92
96
}
93
97
94
98
// Register as an explicit MM callback such that it is run before all reflected
You can’t perform that action at this time.
0 commit comments