Sfoglia il codice sorgente

Add FileLoadException handling to TypeLoadExceptionToString

ManlyMarco 6 anni fa
parent
commit
9f153338da
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      BepInEx/Bootstrap/TypeLoader.cs

+ 8 - 0
BepInEx/Bootstrap/TypeLoader.cs

@@ -61,6 +61,14 @@ namespace BepInEx.Bootstrap
                         sb.AppendLine(exFileNotFound.FusionLog);
                     }
                 }
+                else if (exSub is FileLoadException exLoad)
+                {
+                    if (!string.IsNullOrEmpty(exLoad.FusionLog))
+                    {
+                        sb.AppendLine("Fusion Log:");
+                        sb.AppendLine(exLoad.FusionLog);
+                    }
+                }
                 sb.AppendLine();
             }
             return sb.ToString();