
19 Feb
2006
19 Feb
'06
4:49 p.m.
"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? FWIW, I've often used a scheme of: void foo() { check(try_foo() ); } error_code_t try_foo() { ... } int bar() { int ret; check(try_bar(ret)); return ret; } error_code_t try_bar( int& i ) { ... } -hg