
Beman Dawes <bdawes@acm.org> 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