Changeset 9339


Ignore:
Timestamp:
03/31/13 15:56:44 (7 years ago)
Author:
gkronber
Message:

#1452 show version info in the exception dialog.
The file version of the plugin infrastructure and, in case of the OperatorExecutionException, the file version of the assembly defining the operator is show in the exception details.

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/OperatorExecutionException.cs

    r7259 r9339  
    2121
    2222using System;
     23using System.Diagnostics;
    2324
    2425namespace HeuristicLab.Core {
     
    3233        string name = "\"" + op.Name + "\"";
    3334        if (!op.Name.Equals(op.ItemName)) name += " (" + op.ItemName + ")";
    34 
     35        if (!string.IsNullOrEmpty(op.GetType().Assembly.Location)) {
     36          var fvi = FileVersionInfo.GetVersionInfo(op.GetType().Assembly.Location);
     37          name += " [" + fvi.FileName + ": " + fvi.FileVersion + "]";
     38        }
    3539        if (InnerException == null)
    3640          return base.Message + name + ".";
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/ErrorHandling.cs

    r7259 r9339  
    2121
    2222using System;
     23using System.Diagnostics;
    2324using System.Windows.Forms;
    2425
     
    2930        return string.Empty;
    3031      } else {
    31         string message = exception.GetType().Name + ": " + exception.Message + Environment.NewLine +
     32        string message =
     33          "HeuristicLab version: " + FileVersionInfo.GetVersionInfo(typeof(ErrorHandling).Assembly.Location).FileVersion + Environment.NewLine +
     34          exception.GetType().Name + ": " + exception.Message + Environment.NewLine +
    3235                         exception.StackTrace;
    3336
Note: See TracChangeset for help on using the changeset viewer.