예제 #1
0
 public static void ShowStartupError()
 {
     if (ExceptionsRaised.Any())
     {
         MessageBox.Show(
             ExceptionsRaised.Aggregate(
                 string.Empty,
                 (current, exception) => current + exception.Message + Environment.NewLine),
             "Error starting framework",
             MessageBoxButton.OK,
             MessageBoxImage.Error);
         ShutDown("Startup errors encountered");
     }
 }
예제 #2
0
        public static bool HandleExceptions(Exception exception)
        {
            bool rethrow = false;

            if (ExceptionsRaised.Count < MaxStoredExceptions)
            {
                ExceptionsRaised.Add(exception);
            }
            else
            {
                rethrow = true;
            }

            HandleNoPresentationException(exception);

            return(rethrow);
        }