Re: let g_warn_if_fail replace g_assert
- From: Federico Mena Quintero <federico ximian com>
- To: Tim Janik <timj imendio com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: let g_warn_if_fail replace g_assert
- Date: Fri, 19 Oct 2007 15:41:12 -0500
On Wed, 2007-10-17 at 11:56 +0200, Tim Janik wrote:
> - extend the g_assert() docs to note that:
> 1) programmers are more likely to want to use g_warn_if_fail instead
> (particularly for libraries, allthough the destabilizing effects
> of g_assert are also worth avoiding in applicaiton code);
This is the part I don't like. Making failed sanity checks not exit the
program will *not* make your program more robust; it will just make
people ignore broken programs. Nobody paid attention to critical
warnings until we started actively crashing programs that printed them
during development versions --- grep for g_log_set_always_fatal() in
gnome-session/main.c.
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]