
1 Sep
2005
1 Sep
'05
10:08 p.m.
Roland Schwarz <roland.schwarz@chello.at> 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