Make stacktraces Error instead of Debug

This commit is contained in:
js6pak committed 2021-07-27 16:33:31 +02:00
1 parent b10e4dd90c
commit 0461ab4f39
2 files changed
+4 -14

No files matched your search

+3 -9
View File
@@ -340,11 +340,7 @@ namespace BepInEx.Bootstrap
invalidPlugins.Add(plugin.Metadata.GUID);
Plugins.Remove(plugin.Metadata.GUID);
Logger.LogError($"Error loading [{plugin}] : {ex.Message}");
if (ex is ReflectionTypeLoadException re)
Logger.LogDebug(TypeLoader.TypeLoadExceptionToString(re));
else
Logger.LogDebug(ex);
Logger.LogError($"Error loading [{plugin}]: {(ex is ReflectionTypeLoadException re ? TypeLoader.TypeLoadExceptionToString(re) : ex)}");
}
}
}
@@ -356,8 +352,7 @@ namespace BepInEx.Bootstrap
}
catch { }
Logger.LogError("Error occurred starting the game");
Logger.LogDebug(ex);
Logger.LogError("Error occurred starting the game: " + ex);
}
Logger.LogMessage("Chainloader startup complete");
@@ -371,8 +366,7 @@ namespace BepInEx.Bootstrap
}
catch (Exception e)
{
Logger.LogWarning($"Couldn't run Module constructor for {assembly.FullName}::{plugin.TypeName}: {e.Message}");
Logger.LogDebug(e);
Logger.LogWarning($"Couldn't run Module constructor for {assembly.FullName}::{plugin.TypeName}: {e}");
}
}
@@ -192,11 +192,7 @@ namespace BepInEx.Preloader.Core
}
catch (Exception e)
{
Logger.LogError($"Failed to load patcher [{patcherPlugin.TypeName}]: {e.Message}");
if (e is ReflectionTypeLoadException re)
Logger.LogDebug(TypeLoader.TypeLoadExceptionToString(re));
else
Logger.LogDebug(e.ToString());
Logger.LogError($"Failed to load patcher [{patcherPlugin.TypeName}]: {(e is ReflectionTypeLoadException re ? TypeLoader.TypeLoadExceptionToString(re) : e)}");
}
var assName = ass.GetName();