
Holger Grund wrote:
"Beman Dawes" <bdawes@acm.org> wrote
Do other Boosters like the idea of an overall guideline for dealing with operating system API error reporting?
Absolutely.
Do the specific guidelines make sense? How can they be improved?
I don't quite understand the part with void returns and overloaded and non-overloaded functions. Obviously, overloaded function declarations can't differ by return type only. Do you suggest to supply a non-throwing function with a different name/scope or a function template? If so, how should its interface look like?
// function returning a value: int foo(); // throws on API error int foo( system_error_code_type& ec ); // does not throw // function not normally returning a value: void bar(); // throws on API error system_error_code_type foo(system_error_code_type& ec); // doesn't throw --Beman