Boost logo

Boost :

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
> 17.6.4.10 Restrictions on exception handling
> [res.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().

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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