Ignore:
Timestamp:
Feb 4, 2015, 9:56:43 PM (11 years ago)
Author:
Frederik Heber <heber@…>
Parents:
76a109
git-author:
Frederik Heber <heber@…> (09/23/14 16:34:50)
git-committer:
Frederik Heber <heber@…> (02/04/15 21:56:43)
Message:

Changed checking of Parameter::isValid() on set(), not on get().

  • this would fix problems with ActionQueue::OutputAs...() commands that need to get() parameter values after usage by the Action. If files were forced to be non-present before, then written by the Action, the Validator will then fail.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parameters/Value_impl.hpp

    r76a109 r3e6b93  
    119119inline const T & Value<T>::get() const throw(ParameterValueException)
    120120{
    121   if (!isValid(value)) throw ParameterValueException();
     121  // Actions' parameters may later become invalid because a file has been
     122  // written that was supposed to not exist (!FilePresentValidator())
     123  //  if (!isValid(value)) throw ParameterValueException();
    122124  if (!ValueSet) throw ParameterValueException();
    123125  return value;
     
    131133inline void Value<T>::set(const T & _value) throw(ParameterException)
    132134{
    133   // any value may be set, this allows Actions to have invalid parameters
    134   // (e.g. because the given atom id does not yet exist) that are checked
    135   // on performCall()
    136 //  if (!isValid(_value)) throw ParameterValueException();
     135  if (!isValid(_value)) throw ParameterValueException();
    137136  if (!ValueSet)
    138137    ValueSet = true;
Note: See TracChangeset for help on using the changeset viewer.