Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/08/11 11:40:48 (14 years ago)
Author:
gkronber
Message:

#1466 implemented check for .NET version 4.0 (full profile) and a warning dialog with the download URL.

Location:
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/ErrorHandling.cs

    r5445 r5984  
    2525namespace HeuristicLab.PluginInfrastructure {
    2626  public static class ErrorHandling {
    27     public static readonly string NewLine = Environment.NewLine;
    28 
    2927    public static string BuildErrorMessage(Exception exception) {
    3028      if (exception == null) {
    3129        return string.Empty;
    3230      } else {
    33         string message = exception.GetType().Name + ": " + exception.Message + NewLine +
     31        string message = exception.GetType().Name + ": " + exception.Message + Environment.NewLine +
    3432                         exception.StackTrace;
    3533
    3634        while (exception.InnerException != null) {
    3735          exception = exception.InnerException;
    38           message += NewLine +
    39                      "-----" + NewLine +
    40                      exception.GetType().Name + ": " + exception.Message + NewLine +
     36          message += Environment.NewLine +
     37                     "-----" + Environment.NewLine +
     38                     exception.GetType().Name + ": " + exception.Message + Environment.NewLine +
    4139                     exception.StackTrace;
    4240        }
     
    5351    public static void ShowErrorDialog(string message, Exception exception) {
    5452      using (ErrorDialog dialog = new ErrorDialog(message, exception)) {
     53        dialog.StartPosition = FormStartPosition.CenterScreen;
    5554        dialog.ShowDialog();
    5655      }
Note: See TracChangeset for help on using the changeset viewer.