Merge branch 'master' of https://github.com/Regalis11/Barotrauma into develop

This commit is contained in:
EvilFactory
2023-12-14 11:56:39 -03:00
376 changed files with 7775 additions and 2879 deletions
@@ -2,6 +2,7 @@
using Barotrauma.Steam;
using System;
using System.Diagnostics;
using Barotrauma.IO;
using System.Linq;
using System.Text;
@@ -113,18 +114,25 @@ namespace Barotrauma
}
}
Exception unhandledException = args.ExceptionObject as Exception;
string reportFilePath = "";
try
{
reportFilePath = "servercrashreport.log";
CrashDump(ref reportFilePath, (Exception)args.ExceptionObject);
CrashDump(ref reportFilePath, unhandledException);
}
catch
catch (Exception exceptionHandlerError)
{
//fuck
Debug.WriteLine(exceptionHandlerError.Message);
string slimCrashReport = "Exception handler failed: " + exceptionHandlerError.Message + "\n" + exceptionHandlerError.StackTrace;
if (unhandledException != null)
{
slimCrashReport += "\n\nInitial exception: " + unhandledException.Message + "\n" + unhandledException.StackTrace;
}
File.WriteAllText("servercrashreportslim.log", slimCrashReport);
reportFilePath = "";
}
swallowExceptions(() => NotifyCrash(reportFilePath, (Exception)args.ExceptionObject));
swallowExceptions(() => NotifyCrash(reportFilePath, unhandledException));
swallowExceptions(() => Game?.Exit());
}