Open greenTara opened 7 years ago
A better design for this situation, in general, is to use a while loop that repeats until the condition is passed (success) or some threshold number of loops has been exceeded (failure, throw exception). Depending on the circumstances, we could then handle the exception or have a hard failure. For debugging, this value could be smaller. Once debugging is finished, the threshold would be increased to a larger value.
The first task for this issue is to identify the places where this design is used, and insert a FIXME comment. The second task is to prioritize these for redesign.
qhmm_family is the only script left that does a recursion
Have the unit tests for the modified class been checked?
It is reasonable to postpone the modification of qhmm_family until we need it. Let's leave this issue open however.
Yes, the unit tests have been checked.
There are some methods which call themselves when an error occurs. The idea was that certain undesirable cases from random sampling would be avoided by resampling until a condition was passed. However, this design is difficult for development because exceptions caused by bugs keep recurring on repeated trials, leading to stack overflow.