- Timestamp:
- 11/24/15 16:34:17 (9 years ago)
- 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 60 60 /// </summary> 61 61 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; } 62 70 } 63 71 } -
branches/RefactorPluginInfrastructure-2522/HeuristicLab.PluginInfrastructure/3.3/PluginValidator.cs
r13344 r13363 183 183 RegisterLoadedAssembly(asm); 184 184 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 190 187 } 191 188 return assemblies; … … 216 213 desc.Disable(errorStrBuiler.ToString()); 217 214 } 218 } 219 catch (BadImageFormatException ex) { 215 } catch (BadImageFormatException ex) { 220 216 // disable the plugin 221 217 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "BadImageFormatException: " + ex.Message); 222 } 223 catch (FileNotFoundException ex) { 218 } catch (FileNotFoundException ex) { 224 219 // disable the plugin 225 220 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "FileNotFoundException: " + ex.Message); 226 } 227 catch (FileLoadException ex) { 221 } catch (FileLoadException ex) { 228 222 // disable the plugin 229 223 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "FileLoadException: " + ex.Message); 230 } 231 catch (ArgumentException ex) { 224 } catch (ArgumentException ex) { 232 225 // disable the plugin 233 226 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "ArgumentException: " + ex.Message); 234 } 235 catch (SecurityException ex) { 227 } catch (SecurityException ex) { 236 228 // disable the plugin 237 229 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "SecurityException: " + ex.Message); … … 258 250 pluginDescriptions.AddRange(assemblyPluginDescriptions); 259 251 } 260 // ignore exceptions. Just don't yield a plugin description when an exception is thrown252 // ignore exceptions. Just don't yield a plugin description when an exception is thrown 261 253 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) { 270 258 } 271 259 } … … 339 327 try { 340 328 version = new Version((string)dependencyAttr.ConstructorArguments[1].Value); // might throw FormatException 341 } 342 catch (FormatException ex) { 329 } catch (FormatException ex) { 343 330 throw new InvalidPluginException("Invalid version format of dependency " + name + " in plugin " + pluginType.ToString(), ex); 344 331 } … … 519 506 Assembly.Load(assemblyName); 520 507 assemblyNames.Add(assemblyName); 521 } 522 catch (BadImageFormatException) { 508 } catch (BadImageFormatException) { 523 509 desc.Disable(Path.GetFileName(assemblyLocation) + " is not a valid assembly."); 524 } 525 catch (FileLoadException) { 510 } catch (FileLoadException) { 526 511 desc.Disable("Can't load file " + Path.GetFileName(assemblyLocation)); 527 } 528 catch (FileNotFoundException) { 512 } catch (FileNotFoundException) { 529 513 desc.Disable("File " + Path.GetFileName(assemblyLocation) + " is missing."); 530 } 531 catch (SecurityException) { 514 } catch (SecurityException) { 532 515 desc.Disable("File " + Path.GetFileName(assemblyLocation) + " can't be loaded because of security constraints."); 533 } 534 catch (NotSupportedException ex) { 516 } catch (NotSupportedException ex) { 535 517 // disable the plugin 536 518 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "NotSupportedException: " + ex.Message);
Note: See TracChangeset
for help on using the changeset viewer.