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"); } }
public static bool HandleExceptions(Exception exception) { bool rethrow = false; if (ExceptionsRaised.Count < MaxStoredExceptions) { ExceptionsRaised.Add(exception); } else { rethrow = true; } HandleNoPresentationException(exception); return(rethrow); }