示例#1
0
        private static void HandleException(Exception ex)
        {
            if (ex == null)
            {
                return;
            }

            ShellNotificationService notifications = new ShellNotificationService();

            notifications.Show(BuildExceptionString(ex), "Error",
                               MessageBoxButtons.OK, MessageBoxIcon.Error);


            Environment.Exit(0);
        }
示例#2
0
        private static void HandleException(Exception ex)
        {
            if (ex == null)
            {
                return;
            }

            ShellNotificationService notifications = new ShellNotificationService();

            if (ExceptionPolicy.HandleException(ex, "Default Policy"))
            {
                notifications.Show(Properties.Resources.UnhandledExceptionMessage, Properties.Resources.UnhandledExceptionTitle,
                                   MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            Environment.Exit(0);
        }