diff --git a/SPTarkov.Server/Program.cs b/SPTarkov.Server/Program.cs index 34bb9893..c8cfcd81 100644 --- a/SPTarkov.Server/Program.cs +++ b/SPTarkov.Server/Program.cs @@ -28,6 +28,23 @@ namespace SPTarkov.Server; public static class Program { public static async Task Main(string[] args) + { + try + { + await StartServer(args); + } + catch (Exception e) + { + Console.WriteLine("========================================================================================================="); + Console.WriteLine("The server has unexpectedly stopped, please check your log files and reach out to #spt-support in discord"); + Console.WriteLine(e); + Console.WriteLine("========================================================================================================="); + Console.WriteLine("Press any key to exit..."); + Console.ReadLine(); + } + } + + public static async Task StartServer(string[] args) { Console.OutputEncoding = Encoding.UTF8; @@ -104,6 +121,7 @@ public static class Program { Console.WriteLine(ex); serverExceptionLogger.LogCritical(ex, "Critical exception, stopping server..."); + throw; } finally {