Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/23/09 14:22:29 (15 years ago)
Author:
epitzer
Message:

Added PersistenceException used consistently for all error conditions in the persistence framework (#548)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/Decomposers/Storable/DataMemberAccessor.cs

    r1623 r1625  
    11using System;
    22using System.Reflection;
     3using HeuristicLab.Persistence.Core;
    34
    45namespace HeuristicLab.Persistence.Default.Decomposers.Storable {
     
    2223        PropertyInfo propertyInfo = (PropertyInfo)memberInfo;
    2324        if (!propertyInfo.CanRead || !propertyInfo.CanWrite) {
    24           throw new NotSupportedException(
     25          throw new PersistenceException(
    2526            "Storable properties must implement both a Get and a Set Accessor. ");
    2627        }
     
    2829        Set = value => propertyInfo.SetValue(obj, value, null);
    2930      } else {
    30         throw new NotSupportedException(
     31        throw new PersistenceException(
    3132          "The Storable attribute can only be applied to fields and properties.");
    3233      }
Note: See TracChangeset for help on using the changeset viewer.