On Apr 29, 2010, at 10:38 AM, frank.schoenh...@sun.com wrote: > > > Type: info > Title: ENSURE_OR_CONTINUE/BREAK > Posted by: frank.schoenh...@sun.com > Affected: - > TaskId: i111236 > <http://www.openoffice.org/issues/show_bug.cgi?id=111236> > Effective from: CWS slidecopy > CWS: > <http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300/slidecopy> > CWS status: new > > > *Summary* > -------- > tools/diagnose_ex.h: > + ENSURE_OR_CONTINUE > + ENSURE_OR_BREAK > > *Description* > ------------- > Complementing the existing ENSURE_OR_RETURN(_*) macros in > tools/diagnose_ex.h, which check a condition, and assert/return in > case of failure, ENSURE_OR_CONTINUE/BREAK have been added to the same > include file, which, guess, do a "continue" or "break" when the given > condition is not met (after asserting it).
Defensive programming, eh? Please don't. (Look up the arguments against it in Bertrand Meyer's OO tome, for example. "Defensive programming appears [...] to cover up for the lack of a systematic approach by blindly putting in as many checks as possible, furthering the problem of reliability rather than addressing it seriously.") -Stephan --------------------------------------------------------------------- To unsubscribe, e-mail: interface-announce-unsubscr...@openoffice.org For additional commands, e-mail: interface-announce-h...@openoffice.org