Re: What risk of undefined behavior if destructor must throw?
Gennaro Prota wrote:
On 11 Oct 2006 10:10:39 -0400, "kanze" <kanze@gabi-soft.fr> wrote:
That's what asserts are for, correct. And you never compile
asserts out unless the profiler says you have to.
Absolutely! On a related issue: do you use the standard assert
macro for that (thus taking care of not defining NDEBUG even
in "release" builds) or do you have your own assert facility?
It depends. For in house software, such I currently work on,
the standard assert facility is fine. For software which is
meant to be used out of house, I generally prefer my own
asserts, in order to ensure that the error message contains
enough information so that the user knows it is an internal
error, and knows to contact support.
--
James Kanze GABI Software
Conseils en informatique orient?e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S?mard, 78210 St.-Cyr-l'?cole, France, +33 (0)1 30 23 00 34
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]