private static void OnThreadException(object sender, ThreadExceptionEventArgs t) { FatalError (t.Exception); Application.Exit(); }