On Tue, Mar 13, 2012 at 15:05, Joerg-Cyril.Hoehle@t-systems.com wrote:
Hi,
Maarten's wine-pulse contains several instances of assert() ... What is current opinion on this topic?
IMO asserts are for (fatal) errors that should never happen, that puts a program into an inconsistent state. Consider them as basic invariants of a program, indicative of some serious bug, so better report them as early as possible, to prevent seeing weird issues later where the source of the problem can be very hard to detect/debug.
ERRs are for (possibly non-recoverable, but not necessarily) errors, with a lower importance, i.e. they don't indicate a serious logic flaw in the "core" of the code.
Just my 2 ¢.
Frédéric