Boost logo

Boost :

Subject: Re: [boost] [Thread] Win32 exception handling
From: David Abrahams (dave_at_[hidden])
Date: 2008-11-25 14:54:17


on Tue Nov 25 2008, Chris Newbold <Chris.Newbold-AT-mathworks.com> wrote:

>> From: boost-bounces_at_[hidden] [mailto:boost-
>> bounces_at_[hidden]] On Behalf Of David Abrahams
>
>
>> I talked to an organization a few days ago that wasn't using
>> Boost.Thread because of the catch(...) clause in the thread launching
>> functions.
>
> Are you referring specifically to the catch(...) in thread_start_function?

Yes

>> They wanted the usual Win32 termination behavior (where you
>> get a stack backtrace) instead. While that might seem like a silly
>> reason not to use Boost.Thread, it's legitimate.
>
> Doesn't the call to std::terminate() from that catch(...) block result in the
> application dying in a manner which allows the debugger to intervene?

Yes, but under Win32/MSVC you lose all the backtrace information between
the throw point and the catch.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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