Boost logo

Boost :

Subject: Re: [boost] [system][filesystem v3] Question about error_codearguments
From: Scott McMurray ([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, gregod at, cpdaniel at, john at