Fix following training session from the 20th of May 2021
1 unresolved thread
Compare changes
std::cout << "Gluttony case... but no object to manipulate to extract more information!" << std::endl;
with the latter being the default choice if no other fit your issue. Most of those classes provide a `std::string` argument in its constructor so that you may explain exactly what went wrong.
Exceptions are in fact very subtle to use; see for instance \cite{Sutter1999} and \cite{Sutter2002} that deal with them extensively (hence their title!).
The explanation is quite subtle and explained in detail in item 8 of \cite{Meyers2005}; however just know you should never throw an exception there. If you need to deal with an error there, use something else (`std::abort` for instance).
I (Sébastien) provide in [appendix](/notebooks/7-Appendix/HomemadeException.ipynb) my own exception class (which of course derives from `std::exception`) which provides additionally:
Vincent uses up the STL exceptions described in [previous section](#Good-practice:-be-wary-of-a-forest-of-exception-classes).
A quick word about C-style error management which you might find in use in some libraries: **error codes**.