use eoExceptions everywhere

This commit is contained in:
Johann Dreo 2020-03-27 00:21:52 +01:00
commit eba2e14950
127 changed files with 524 additions and 418 deletions

View file

@ -215,12 +215,12 @@ try {
double pCross = parser.createParam(0.6, "pCross", "Probability of Crossover", 'C', "Variation Operators" ).value();
// minimum check
if ( (pCross < 0) || (pCross > 1) )
throw runtime_error("Invalid pCross");
throw eoParamException("Invalid pCross");
double pMut = parser.createParam(0.1, "pMut", "Probability of Mutation", 'M', "Variation Operators" ).value();
// minimum check
if ( (pMut < 0) || (pMut > 1) )
throw runtime_error("Invalid pMut");
throw eoParamException("Invalid pMut");
// now create the generalOp
eoSGAGenOp<Indi> op(cross, pCross, mut, pMut);
@ -827,7 +827,7 @@ eoContinue<Indi> & do_make_continue(eoParser& _parser, eoState& _state, eoEvalFu
// now check that there is at least one!
if (!continuator)
throw runtime_error("You MUST provide a stopping criterion");
throw eoException("You MUST provide a stopping criterion");
// OK, it's there: store in the eoState
_state.storeFunctor(continuator);