Hi Everyone, I wanted to share an observation. A number of Boost libraries, in documentation, when it comes to demonstrating that a given function throws an exception, has a code sample like the following:
try {
lib::function(); } catch(lib::exception const&) { // handle failure }
I don't think there's anything wrong with that code. Exceptions should be handled at the point where it makes sense for the program. Sometimes
On 29.05.22 00:39, Andrzej Krzemienski via Boost wrote: that's far up the call tree, but just as often it's very close to where the exception is thrown. The value in exceptions is not just that they can be handled non-locally, but that they provide a uniform way of handling both local and non-local failures. -- Rainer Deyke (rainerd@eldwood.com)