From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-03-17 16:53:33
At 02:43 PM 3/17/2001, David Abrahams wrote:
>IMO using the question "is this an exceptional situation?" to decide
>to throw an exception has an attractive ring to it, but is usually a
>mistake. A more appropriate question to ask is: "do we want stack
>As a developer, if I have violated a precondition of a library I'm using,
>don't want stack unwinding. What I want is a core dump or the equivalent
>way to inspect the state of the program at the point where the problem
>detected. That usually means assert() or some equivalent.
>I have sympathy with the idea of making resilient APIs which can stand up
>nearly any kind of client abuse, but there is usually a significant cost
>this approach. If someone wants that sort of protection, it can usually
>provided as a layer on top of a simpler API. I am utterly unsympathetic
>half-measures, though. An API which promises resilience against some, but
>not all abuse is an invitation to disaster.
Please, please, please, convert the above to HTML and stick it in
Then I have to figure a way to hardwire my brain to always read the page
before I design a new interface or new error detection code to an old one.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk