Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/27/09 09:30:31 (15 years ago)
Author:
epitzer
Message:

Re-wrap all exceptions into generic exception so they can be displayed without the need to load plugins/assemblies. (#602)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/Runner.cs

    r1594 r1666  
    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
Note: See TracChangeset for help on using the changeset viewer.