On 07.03.2012 16:34, Steven Schveighoffer wrote:
On Wed, 07 Mar 2012 02:33:05 -0500, Dmitry Olshansky
<dmitry.o...@gmail.com> wrote:

Exception is a graceful shutdown, as it calls destructors & finally
blocks while unrolling the stack.

You're assuming the program uses finally/scope exit blocks to do
shutdown logic. This is not always the case. A library shouldn't force
certain development styles.


I do and within the reason. Doing graceful shutdown logic in scope/finally/destructors or what the heck the top-most catch(Exception) is not just a good practice. Otherwise an unexpected exception on the way up leaves debris and destruction behind, and the whole point of graceful shutdown is lost. Yup, one can provide an alternative way of shutdown, yet one still has to think of unexpected exceptions.


--
Dmitry Olshansky

Reply via email to