$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-17 21:17:38
----- Original Message -----
From: "Jeff Garland" <jeff_at_[hidden]>
>
> I guess I don't understand how anyone can create applications which
> must run 24X7 and survive programmer errors with any library that
> takes the "assert policy". It's one thing if they can be compiled
> out, but I don't think that's what's being suggested....
>
> For fault resilient applications a typical strategy in libraries
> is to assert during unit testing and throw an exception
> in integration test and production. In production the exception
> is something like std::logic_error. Usually a macro handles
> the conditional compilation of the library.
Yes. I am only saying that for that kind of application it is important to
check /everything/ /thoroughly/, e.g. "is this object the client is passing
me actually a live one that I've created, or is it a dangling pointer?". If
some clients of your library can't afford those kinds of checks, you're
better off wrapping the lower-level API in a checking API. We shouldn't
throw exceptions for just a few client errors that can be easily detected.
-Dave