![]() ![]() So, now we are forced to take care about exceptions!īut its hard, its really hard. This feels like walking on shaky grounds. And then more places in the C++ foundational code throw exceptions. This makes about any line of C++ code vulnerable to an exception. ![]() ![]() But when you have to write reliable code, you just can't ignore EH these days: It starts with the new, which may throw an exception, instead of just returning 0 (like in the old days). I try to avoid EH and just use return values, callbacks or whatever fits the purpose. The comparison to goto fits perfect, it made me think again about EH. Joel on software wrote an article about it. Though most people seem to ignore it or just accept it, EH has some huge drawbacks: exceptions are invisible to the code and it creates many, many possible exit points. Exception handling (EH) seems to be the current standard, and by searching the web, I can not find any novel ideas or methods that try to improve or replace it (well, some variations exist, but nothing novel).
0 Comments
Leave a Reply. |