Kaynağa Gözat

Catch exception for loading an incompatible dll

Bepis 6 yıl önce
ebeveyn
işleme
1b13b3c78d
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. 5 1
      BepInEx/TypeLoader.cs

+ 5 - 1
BepInEx/TypeLoader.cs

@@ -40,7 +40,11 @@ namespace BepInEx
                         }
                     }
                 }
-                catch (BadImageFormatException) { }
+                catch (BadImageFormatException) { } //unmanaged DLL
+                catch (ReflectionTypeLoadException)
+                {
+                    BepInLogger.Log($"ERROR! Could not load \"{Path.GetFileName(dll)}\" as a plugin!");
+                } 
             }
 
             return types;