Re: g_assert vs. g_return_if_fail
- From: Martin Kalbfuß <ma kalbfuss web de>
- To: Lex Trotman <elextr gmail com>
- Cc: Gtk+ <gtk-list gnome org>
- Subject: Re: g_assert vs. g_return_if_fail
- Date: Thu, 21 Jan 2010 01:14:11 +0100
OK, Many thanks. That's a good reason not to use g_assert, in such a
place.
But when the caller should have the ability to handle the error, why not
use GError? Isn't it exactly doing this? Indicate an error, but don't
abort the program on it's own?
Wrong input from a user is not a programming error.
> Also if your library is re-compiled with the option to remove assert
> then it won't have any checking any more
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]