File tree 1 file changed +11
-5
lines changed
1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -97,11 +97,17 @@ void LoadDLL(string path, GameObject obj)
97
97
}
98
98
catch ( ReflectionTypeLoadException e )
99
99
{
100
- StringBuilder strTypes = new StringBuilder ( ) ;
101
- foreach ( var t in e . Types ) { strTypes . Append ( t + "\r \n " ) ; }
102
- StringBuilder strExceptions = new StringBuilder ( ) ;
103
- foreach ( var l in e . LoaderExceptions ) { strExceptions . Append ( l + "\r \n " ) ; }
104
- Logger . LogError ( $ "Error While loading { path } \r \n -- Types --\r \n { strTypes } \r \n -- LoaderExceptions --\r \n { strExceptions } \r \n -- StackTrace --\r \n { e . StackTrace } ") ;
100
+ var sbMessage = new StringBuilder ( ) ;
101
+ sbMessage . AppendLine ( $ "Error While loading { path } ") ;
102
+ sbMessage . AppendLine ( "-- Successfully Read Types --" ) ;
103
+ foreach ( var t in e . Types )
104
+ if ( t != null ) sbMessage . AppendLine ( t . ToString ( ) ) ;
105
+ sbMessage . AppendLine ( "\r \n -- LoaderExceptions --" ) ;
106
+ foreach ( var l in e . LoaderExceptions )
107
+ if ( l != null ) sbMessage . AppendLine ( l . ToString ( ) ) ;
108
+ sbMessage . AppendLine ( "\r \n -- StackTrace --" ) ;
109
+ sbMessage . AppendLine ( e . StackTrace ) ;
110
+ Logger . LogError ( sbMessage . ToString ( ) ) ;
105
111
}
106
112
}
107
113
}
You can’t perform that action at this time.
0 commit comments