4 ms·
“Error states are a normal part of all code, no exceptions required since obviously many languages don’t have them.” An error and an exception are the same con
by reactordev 3y ago
“Error states are a normal part of all code, no exceptions required since obviously many languages don’t have them.”
An error and an exception are the same concept. Yes, it’s true that not using the std::exception class or any template named “exception” is exception free code. But you’re just lying to yourself. An error check or an assert or verify not <condition> is a “catch”.
- thegrim33 3y agoNo, they're not the same concept, they're both ways to express error conditions but they way they function are very different. People very intentionally do not use exceptions because of how they function and the potential impact on performance compared to other ways of error handling. As well as having other negatives, which other people below have listed when you made a similar comment.