Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1395


Ignore:
Timestamp:
03/21/09 18:02:59 (16 years ago)
Author:
gkronber
Message:

Fixed #458 (HeuristicLab crashes when it tries to load plugins with missing attributes).

File:
1 edited

Legend:

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

    r1229 r1395  
    3535    /// <param name="pluginName">The plugin that has been loaded.</param>
    3636    public delegate void PluginLoadedEventHandler(string pluginName);
    37    
     37
    3838    public delegate void PluginLoadFailedEventHandler(string pluginName, string args);
    3939
     
    188188          info.Assemblies.Add(assembly.FullName);
    189189          info.Message = "Couldn't load file: " + ex.FileName;
     190          disabledPlugins.Add(info);
     191        }
     192        catch (InvalidPluginException ex) {
     193          PluginInfo info = new PluginInfo();
     194          AssemblyName name = assembly.GetName();
     195          info.Name = name.Name;
     196          info.Version = name.Version;
     197          info.Files.Add(assembly.Location);
     198          info.Assemblies.Add(assembly.FullName);
     199          info.Message = "Couldn't load plugin class from assembly: " + assembly.GetName().Name+". Necessary plugin attributes are missing.";
    190200          disabledPlugins.Add(info);
    191201        }
Note: See TracChangeset for help on using the changeset viewer.