Log exceptions for dedicated servers.

This commit is contained in:
Matthias Mailänder
2025-09-13 13:26:32 +02:00
committed by Gustas Kažukauskas
parent 619c5a13a1
commit 2d755b010c

View File

@@ -27,8 +27,10 @@ namespace OpenRA.Server
{
Run(args);
}
catch
catch (Exception e)
{
ExceptionHandler.HandleFatalError(e);
// Flush logs before rethrowing, i.e. allowing the exception to go unhandled.
// try-finally won't work - an unhandled exception kills our process without running the finally block!
Log.Dispose();