use assert etc. in Wine dlls? What is better?

Frédéric Delanoy frederic.delanoy at gmail.com
Tue Mar 13 10:34:19 CDT 2012


On Tue, Mar 13, 2012 at 15:05,  <Joerg-Cyril.Hoehle at 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



More information about the wine-devel mailing list