LogFatalException() private method

private LogFatalException ( Exception exception, [ previousMethodName = null ) : void
exception System.Exception
previousMethodName [
return void
コード例 #1
0
        private static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs args)
        {
            if (args?.ExceptionObject == null)
            {
                ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.ExceptionObject));
                return;
            }

            ArchiLogger.LogFatalException((Exception)args.ExceptionObject);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: FoxLeks/ArchiSteamFarm
        private static async void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs args)
        {
            if (args?.ExceptionObject == null)
            {
                ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.ExceptionObject));
                return;
            }

            ArchiLogger.LogFatalException((Exception)args.ExceptionObject);
            await Task.Delay(5000).ConfigureAwait(false);

            await Exit(1).ConfigureAwait(false);
        }