Quote:
What I like about the mandatory "throws" keyword isn't that it gives me specific information about how to handle an exception, but that it protects against stealth exceptions -- exceptions that are being thrown a few function calls down, but that you have no indication they exist.
As noted, C++ has the catch (...) construct for such "catch-all" exception handling. C++ simply does not have checked exceptions.
Quote:
What Java does do that helps you handle exceptions when you have no idea what you're doing, is provide a base Exception class, that all exceptions derive from. This class contains a string, so at the very least, if all else fails, you can tell the user what went wrong. There's no such thing as an unknown exception, because every exception knows at some level what it is.
std::exception would be the C++ near equivalent. All exceptions throwable in the standard library are derived from it. If I do need to write my own exception classes, I subclass an appropriate class in the std::exception hierarchy. The what() member function of std::exception returns a string that should describe what went wrong.