Vyjimky tak jak jsou bezne resene v C++, javach, pythonech apod. nam serviruji dilema, kde vyjimku osetrit. Bliz u vyjimky mame vic kontextu, jak provest zotaveni, naopak dal/vyse zase vime, jaky zpusob zotaveni chceme pouzit.
Vsuvka: Lepsi pristup jsou tzv. restarty a conditiony:
https://en.wikibooks.org/wiki/Common_Lisp/Advanced_topi...
The condition system can be broken into three parts, signalling or raising conditions, handling conditions, and providing recovery from conditions. Almost every modern programming language offers the first two protocols, but very few offer the last (or distinguish between the last two). This last protocol, providing restarts, or ways for the program to recover, is in some ways the most important aspect of Common Lisp condition handling.
Konkretne v tvem pripade std::bad_alloc se vetsinou neda chytrejs osetrit nez si postezovat. Pokud je to mala funkce urcite bych ji vyhazoval vejs, ale zachytil bych v nejakym modulu, aby to neotravovalo na ty nejvyssi urovni, jelikoz s tim stejne nebudes delat nic jinyho.