Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11117 for trunk


Ignore:
Timestamp:
07/07/14 16:22:49 (10 years ago)
Author:
ascheibe
Message:

#2153 changed exception type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/AssemblyHelpers.cs

    r11113 r11117  
    3434      object[] attributes = assembly.GetCustomAttributes(typeof(T), false);
    3535      if (attributes.Length == 0) {
    36         throw new Exception(string.Format("No attributes of type {0} found in assembly {1}", typeof(T).Name,
     36        throw new InvalidOperationException(string.Format("No attributes of type {0} found in assembly {1}", typeof(T).Name,
    3737          assembly.FullName));
    3838      }
     
    4141      var propertyInfo = attribute.GetType().GetProperty(propertyName);
    4242      if (propertyInfo == null) {
    43         throw new Exception(string.Format("No property {0} found in attribute {1}, assembly: {2}",
     43        throw new InvalidOperationException(string.Format("No property {0} found in attribute {1}, assembly: {2}",
    4444          propertyName, typeof(T).Name, assembly.FullName));
    4545      }
Note: See TracChangeset for help on using the changeset viewer.