Boost logo

Boost :

Subject: Re: [boost] [Thread] Win32 exception handling
From: Alexander (gutenev_at_[hidden])
Date: 2008-11-27 04:42:19


"David Abrahams" <dave_at_[hidden]> wrote in message
news:87prkj65ri.fsf_at_mcbain.luannocracy.com...
>
> whether a preprocessor switch to allow exceptions to leak would be a
> good idea?

For me, yes, regardless on whether this would be unconforming.

When something really unexpected happens, the best for us is to get a crash
dump (from winqual or written manually). Then it is important not to lose
any context, so that dump would be useful.
We prefer to to catch any SEH exceptions, not to set SEH translator, and
compile with /EHcs. Destructors are not called, memory is not deallocated.
WerUnregisterMemoryBlock, which is called from destructor is not called.
For C++ exception we avoid catch(...) and exception specification (even
throw() in destructor), just for same reason - immediately crash and send
dump to winqual is the best thing when something unexpected happens.

However, for other projects other strategy will be better.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk