Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-02-17 20:39:25


Beman Dawes <bdawes_at_[hidden]> writes:

> Such functions should also have an overload that takes an
> additional argument of type boost::system_error_code& ec. The
> behavior of this overload is the same as the non-overloaded
> version, except that it does not throw an exception on an API
> error, and it sets ec to the error code reported by the operating
> system, or to 0 if no error is reported.

Why are system-error-reporting functions special in this regard? The
rationale doesn't give me any reason not to think we need to do this
with every function that could otherwise throw, regardless of the
reason. If that's not the conclusion you want to reach, you should
refine the rationale so it describes why system errors are more
special than all the other ones.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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