Gui logging fix
This commit is contained in:
@@ -92,15 +92,11 @@ public static class Program
|
|||||||
=> HandleUnhandledException(sender, e.Exception);
|
=> HandleUnhandledException(sender, e.Exception);
|
||||||
|
|
||||||
private static void HandleUnhandledException(object? sender, Exception? ex, [CallerMemberName] string caller = "")
|
private static void HandleUnhandledException(object? sender, Exception? ex, [CallerMemberName] string caller = "")
|
||||||
{
|
=> Log.Warning(
|
||||||
Log.Fatal(
|
|
||||||
ex,
|
ex,
|
||||||
"An unhandled exception come from '{Caller}' exception handler from an object of type '{Type}' and value '{Value}': {Exception}",
|
"An unhandled exception come from '{Caller}' exception handler from an object of type '{Type}' and value '{Value}': {Exception}",
|
||||||
caller,
|
caller,
|
||||||
sender?.GetType().ToString() ?? "null",
|
sender?.GetType().ToString() ?? "null",
|
||||||
sender?.ToString() ?? "null",
|
sender?.ToString() ?? "null",
|
||||||
ex);
|
ex);
|
||||||
|
|
||||||
Log.CloseAndFlush();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user