Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-09-01 17:08:14


Roland Schwarz <roland.schwarz_at_[hidden]> writes:

> John Maddock schrieb:
>
>>Another query: couldn't we make whether exceptions get swallowed a runtime
>>parameter? As in:
>>
>>if(swallow_exceptions)
>>{
>> try{ users_thread_proc(); }catch(...){ whatever(); }
>>}
>>else
>> users_thread_proc();
>>
>>
>>
> Unfortunately I was posting my first response to the wrong place.
>
> Wouldn't it be a viable alternative to leave out the swallowed
> exceptions just
> in debug build?

Bad idea, IMO.

If you leave the catch(...) in, you forcibly mask any useful behaviors
that the implementation might provide for uncaught exceptions leaking
from the thread. The user ought to have the option to allow the
system to do whatever it does.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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