Subject: Re: [boost] [system][filesystem v3] Question about error_code arguments
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-10-28 16:32:10
On Wed, Oct 28, 2009 at 12:40 PM, Detlef Vollmann <dv_at_[hidden]> wrote:
> Domagoj Saric wrote:
>> ~error() ( if ( !inspected ) throw actual_error_; )
> This was discussed in the POSIX/C++ meeting 10 days ago, and was
> considered to be a good idea.
> Unfortunately, in the current C++ working paper, we have in
> 126.96.36.199 Restrictions on exception handling
> "4 Destructor operations defined in the C++ standard library
> shall not throw exceptions. "
A library should either throw when the error is detected or not. If it
doesn't, the user might still throw, but the *library* throwing later
seems a very bad idea. Not to mention the issue that throwing in a
destructor can end up calling abort().
Reverge Studios, Inc.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk