Boost logo

Boost :

Subject: Re: [boost] [Thread] Win32 exception handling
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2008-11-25 16:39:24


----- Original Message -----
From: "Alexander Terekhov" <terekhov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Tuesday, November 25, 2008 10:17 PM
Subject: Re: [boost] [Thread] Win32 exception handling

> David Abrahams wrote:
> [...]
>> OK, great, a second data point. How do you feel about the fact that the
>> upcoming standard requires the catch(...)?
>
> IMO, that's very idiotic, if true.
>
> User code doesn't expect some exception: suppose the case when caller
> has made precautions so that this or that operation's documented
> exception shall not occur in context established by caller.
>
> And operation suddenly throws... that means broken program state... and
> you insist on unwinding. Nonsense! The program shall abort() ASAP at
> throw point. Cleanup for eventual external resources (if it really
> matters/shall be reliable) shall be done by another higher level
> (isolated) program (with clean state) acting as watchdog (broken state
> program can not be trusted to do any cleanup of external resources).
> Cleanup for stack frames ("locals") makes even less sense, given broken
> program state (possibly including stack frames).

Why do you associate an exception to a broken program state?
 
Vicente


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