Added an error message in case of unknown reducer
(was the source of a segmentation fault with old parameter files)
This commit is contained in:
parent
d4093063cb
commit
f81d92a0af
1 changed files with 7 additions and 3 deletions
|
|
@ -99,9 +99,13 @@ eoReduce<EOT> & decode_reduce(eoParamParamType & _ppReduce, eoState & _state)
|
|||
ptReduce = new eoStochTournamentTruncate<EOT>(p);
|
||||
}
|
||||
else if (_ppReduce.first == string("Uniform"))
|
||||
{
|
||||
ptReduce = new eoRandomReduce<EOT>;
|
||||
}
|
||||
{
|
||||
ptReduce = new eoRandomReduce<EOT>;
|
||||
}
|
||||
else // no known reduction entered
|
||||
{
|
||||
throw runtime_error("Unknown reducer: " + _ppReduce.first);
|
||||
}
|
||||
// all done, stores and return a reference
|
||||
_state.storeFunctor(ptReduce);
|
||||
return (*ptReduce);
|
||||
|
|
|
|||
Reference in a new issue