
"Beman Dawes" <bdawes@acm.org> wrote in message news:43F61C1A.5060803@acm.org...
Each Boost library that calls operating system API's seems to deal with API error reporting in its own way. That's hard on users, and doubly so if a particular library's approach doesn't easily support a needed use case.
Boost.Filesystem certainly had that problem, and users reported having to litter their code with try/catch blocks to cope with it only supporting error-reporting-by-exception.
I think the two-pronged approach Boost.Filesystem finally settled on might work well for other library's too. I've written it up as a general guideline. See attached.
Do other Boosters like the idea of an overall guideline for dealing with operating system API error reporting?
Do the specific guidelines make sense? How can they be improved?
Comments welcome,
Fresh draft up at www.esva.net/~beman/error_reporting_guidelines.html. This tries to incorporate concerns, comments, and suggestions from Eric Niebler, Dave Abrahams, and John Maddock. Further comments welcome, --Beman