diff --git a/src/GuiApp/Avalonia/FileTime.GuiApp.App/Program.cs b/src/GuiApp/Avalonia/FileTime.GuiApp.App/Program.cs index a8e24bc..b76c324 100644 --- a/src/GuiApp/Avalonia/FileTime.GuiApp.App/Program.cs +++ b/src/GuiApp/Avalonia/FileTime.GuiApp.App/Program.cs @@ -127,11 +127,15 @@ public static class Program => HandleUnhandledException(sender, e.Exception); private static void HandleUnhandledException(object? sender, Exception? ex, [CallerMemberName] string caller = "") - => Log.Fatal( + { + Log.Fatal( ex, "An unhandled exception come from '{Caller}' exception handler from an object of type '{Type}' and value '{Value}': {Exception}", caller, sender?.GetType().ToString() ?? "null", sender?.ToString() ?? "null", ex); + + Log.CloseAndFlush(); + } } \ No newline at end of file