3 ms·
> I have never seen C++ code where the constructor call is wrapped in with an exception handler. The point of exceptions is not to wrap every call that can thr
by jcelerier 7y ago
> I have never seen C++ code where the constructor call is wrapped in with an exception handler.
The point of exceptions is not to wrap every call that can throw but instead to let them bubble up to have them be handled where it makes most sense - a large amount of software only needs to show an error dialog to the user and asks the user to save / exit, or log a message somewhere (so a single `catch` at the top of your event loop).
Only when you know for a fact that a subsystem can actually handle a specific case of error more intelligently, then you add exception handling there.