mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Update Program.cs (#2589)
This commit is contained in:
@@ -476,10 +476,7 @@ internal static class Program {
|
||||
|
||||
private static async void OnUnhandledException(object? sender, UnhandledExceptionEventArgs e) {
|
||||
ArgumentNullException.ThrowIfNull(e);
|
||||
|
||||
if (e.ExceptionObject == null) {
|
||||
throw new ArgumentNullException(nameof(e));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(e.ExceptionObject);
|
||||
|
||||
await ASF.ArchiLogger.LogFatalException((Exception) e.ExceptionObject).ConfigureAwait(false);
|
||||
await Exit(1).ConfigureAwait(false);
|
||||
@@ -487,10 +484,7 @@ internal static class Program {
|
||||
|
||||
private static async void OnUnobservedTaskException(object? sender, UnobservedTaskExceptionEventArgs e) {
|
||||
ArgumentNullException.ThrowIfNull(e);
|
||||
|
||||
if (e.Exception == null) {
|
||||
throw new ArgumentNullException(nameof(e));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(e.Exception);
|
||||
|
||||
await ASF.ArchiLogger.LogFatalException(e.Exception).ConfigureAwait(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user