Exemplo n.º 1
0
 private static void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)
 {
     Log.E(e.Exception);
     Backend.Stop();
     ShowCrash(e.Exception);
     Application.Exit();
 }
Exemplo n.º 2
0
 private static void ThreadExceptionHandler(object sender, ThreadExceptionEventArgs t)
 {
     Log.E(t.Exception);
     Backend.Stop();
     ShowCrash(t.Exception);
     Application.Exit();
 }
Exemplo n.º 3
0
        static void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs args)
        {
            Backend.Stop();
            Exception e = args.ExceptionObject as Exception;

            if (e != null)
            {
                Log.E(e);
                ShowCrash(e);
            }
            Application.Exit();
        }
Exemplo n.º 4
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     Log.Line($"Form1_FormClosing: killing backend");
     // might be called from non-ui thread when called in crash handler
     // due to Appliction.Exit. Don't do complicated things in that case
     if (!InvokeRequired)
     {
         // TODO: if we have multiple forms, only when last form is closed
         Backend.Stop();
         Cef.Shutdown();
     }
     Log.Close();
 }