Tagged Questions
7
votes
5answers
2k views
Are exceptions as control flow considered a serious antipattern? If so, Why?
Back in the late 90's I worked quite a bit with a code base that used exceptions as flow control. It implemented a finite state machine to drive telephony applications. Lately I am reminded of those ...
4
votes
2answers
401 views
Is there a term for the error-handling anti-pattern of discarding all available info and just returning failure?
From time to time (unfortunately way too often) I have to fix code such as this:
// C++ code
bool anyOldFunction(Param p) {
try {
...
if(some_condition_here) {
handleErrorX();
return ...