예제 #1
0
        private static void Main(string[] args)
        {
            var dbPath = args.Length > 0 ? args[0] : null;

            Application.EnableVisualStyles();
            Application.ThreadException += (s, t) =>
            {
                var msg = string.Format("{0} {1}", t.Exception.GetType().Name, t.Exception.Message);
                Thrower.Dump(t.Exception);
                MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            };
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm(dbPath));
        }
예제 #2
0
 private static void OnException(Exception ex)
 {
     Console.WriteLine(string.Format("{0} {1}", ex.GetType(), ex.Message));
     Thrower.Dump(ex);
     Environment.Exit(1);
 }