コード例 #1
0
ファイル: Program.cs プロジェクト: evgeniylevakhin/Talky
        static void UnhandledExceptionTrapper(object sender, UnhandledExceptionEventArgs e)
        {
            ConsoleColor colorBefore = Console.ForegroundColor;

            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine(e.ExceptionObject.ToString());
            Console.ForegroundColor = colorBefore;
            _chatServer1?.ShutDown();
            wh.Set();
            Environment.Exit(1);
        }