Free cookie consent management tool by TermsFeed Policy Generator

Ticket #602: exception re-wraping.diff

File exception re-wraping.diff, 893 bytes (added by epitzer, 15 years ago)
  • HeuristicLab.PluginInfrastructure/Runner.cs

     
    5252
    5353    public void Run(ApplicationInfo appInfo) {
    5454      IApplication runnablePlugin = (IApplication)Activator.CreateInstance(appInfo.PluginAssembly, appInfo.PluginType).Unwrap();
    55       runnablePlugin.Run();
     55      try {
     56        runnablePlugin.Run();
     57      } catch (Exception e) {
     58        throw new Exception(String.Format(
     59          "Unexpected exception caught: \"{0}\"\r\n" +
     60          "Type: {1}\r\n" +
     61          "Plugin {2}:\r\n{3}",
     62          e.Message,
     63          e.GetType().FullName,
     64          appInfo.Name,
     65          e.ToString()));
     66      }
    5667    }
    5768
    5869    private void FireOnLoad() {