Subject: Re: [boost] [system][filesystem v3] Question about error_codearguments
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2009-10-29 10:31:13
2009/10/29 Stewart, Robert <Robert.Stewart_at_[hidden]>:
> ~error_code() could test for a pending exception before throwing an exception. Â If there is a pending exception, that means the stack is being unwound and the error_code shouldn't aggravate the situation by throwing its own. Â Otherwise, it can throw in its destructor, right? Â Given that the caller expressly asked for the function to throw no exceptions but populate an error_code, it isn't too much to expect that caller to check for an error, even when the error is to be ignored. Â (Indeed, error_code could provide a constructor argument or member function indicating that the caller wishes to ignore the error.)
"Unfortunately, I do not know of any good and safe use for
std::uncaught_exception. My advice: Don't use it."
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk