Exceptions are used over return codes/errnos to handle errors, as they are the idiomatic error handling mechanism in modern C++ code.
- First and foremost, an uncaught exception exits the program. This is a Good Thing™. Exceptions should only be thrown in the first place when an problem occurs that cannot be handled in the current scope. If this problem is not handled at some scope above the current one, the program should exit, regardless of what error handling paradigm is being used.