Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/24/15 16:34:17 (9 years ago)
Author:
gkronber
Message:

#2522: improvements to new PluginInformationDialog and removed obsolete classes

Location:
branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/Interfaces/IPluginDescription.cs

    r12012 r13363  
    6060    /// </summary>
    6161    string LicenseText { get; }
     62    /// <summary>
     63    /// Gets or sets the plugin state.
     64    /// </summary>
     65    PluginState PluginState { get; }
     66    /// <summary>
     67    /// Gets the error message why this plugin has been disabled.
     68    /// </summary>
     69    string LoadingErrorInformation { get; }
    6270  }
    6371}
  • branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginValidator.cs

    r13344 r13363  
    183183          RegisterLoadedAssembly(asm);
    184184          assemblies.Add(asm);
    185         }
    186         catch (BadImageFormatException) { } // just ignore the case that the .dll file is not a CLR assembly (e.g. a native dll)
    187         catch (FileLoadException) { }
    188         catch (SecurityException) { }
    189         catch (ReflectionTypeLoadException) { } // referenced assemblies are missing
     185        } catch (BadImageFormatException) { } // just ignore the case that the .dll file is not a CLR assembly (e.g. a native dll)
     186        catch (FileLoadException) { } catch (SecurityException) { } catch (ReflectionTypeLoadException) { } // referenced assemblies are missing
    190187      }
    191188      return assemblies;
     
    216213            desc.Disable(errorStrBuiler.ToString());
    217214          }
    218         }
    219         catch (BadImageFormatException ex) {
     215        } catch (BadImageFormatException ex) {
    220216          // disable the plugin
    221217          desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "BadImageFormatException: " + ex.Message);
    222         }
    223         catch (FileNotFoundException ex) {
     218        } catch (FileNotFoundException ex) {
    224219          // disable the plugin
    225220          desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "FileNotFoundException: " + ex.Message);
    226         }
    227         catch (FileLoadException ex) {
     221        } catch (FileLoadException ex) {
    228222          // disable the plugin
    229223          desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "FileLoadException: " + ex.Message);
    230         }
    231         catch (ArgumentException ex) {
     224        } catch (ArgumentException ex) {
    232225          // disable the plugin
    233226          desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "ArgumentException: " + ex.Message);
    234         }
    235         catch (SecurityException ex) {
     227        } catch (SecurityException ex) {
    236228          // disable the plugin
    237229          desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "SecurityException: " + ex.Message);
     
    258250          pluginDescriptions.AddRange(assemblyPluginDescriptions);
    259251        }
    260         // ignore exceptions. Just don't yield a plugin description when an exception is thrown
     252          // ignore exceptions. Just don't yield a plugin description when an exception is thrown
    261253        catch (FileNotFoundException) {
    262         }
    263         catch (FileLoadException) {
    264         }
    265         catch (InvalidPluginException) {
    266         }
    267         catch (TypeLoadException) {
    268         }
    269         catch (MissingMemberException) {
     254        } catch (FileLoadException) {
     255        } catch (InvalidPluginException) {
     256        } catch (TypeLoadException) {
     257        } catch (MissingMemberException) {
    270258        }
    271259      }
     
    339327          try {
    340328            version = new Version((string)dependencyAttr.ConstructorArguments[1].Value); // might throw FormatException
    341           }
    342           catch (FormatException ex) {
     329          } catch (FormatException ex) {
    343330            throw new InvalidPluginException("Invalid version format of dependency " + name + " in plugin " + pluginType.ToString(), ex);
    344331          }
     
    519506              Assembly.Load(assemblyName);
    520507              assemblyNames.Add(assemblyName);
    521             }
    522             catch (BadImageFormatException) {
     508            } catch (BadImageFormatException) {
    523509              desc.Disable(Path.GetFileName(assemblyLocation) + " is not a valid assembly.");
    524             }
    525             catch (FileLoadException) {
     510            } catch (FileLoadException) {
    526511              desc.Disable("Can't load file " + Path.GetFileName(assemblyLocation));
    527             }
    528             catch (FileNotFoundException) {
     512            } catch (FileNotFoundException) {
    529513              desc.Disable("File " + Path.GetFileName(assemblyLocation) + " is missing.");
    530             }
    531             catch (SecurityException) {
     514            } catch (SecurityException) {
    532515              desc.Disable("File " + Path.GetFileName(assemblyLocation) + " can't be loaded because of security constraints.");
    533             }
    534             catch (NotSupportedException ex) {
     516            } catch (NotSupportedException ex) {
    535517              // disable the plugin
    536518              desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "NotSupportedException: " + ex.Message);
Note: See TracChangeset for help on using the changeset viewer.