
On Wed, Oct 28, 2009 at 12:40 PM, Detlef Vollmann <dv@vollmann.ch> 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