In my code 99% of my exceptions are derived from runtime_exception.
The reasons I catch exceptions are:
- Catch Log and Fix problem.
- Catch Log and Generate a more specific exception and throw
- Catch Log and rethrow.
- Catch Log and Kill operation (discard exception)
- User/request initiated action fails.
An HTTP request handler for example. I would rather the requested operation die rather than bring the Service down. (Though preferably the handler has enough sense to return a 500 error code.)
- Test case passed/failed with an exception.
- All exceptions not in the main thread.
Allowing exceptions to escape a thread is usually badly documented but usually causes program termination (without stack unwinding).