Re: g_assert vs. g_return_if_fail



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]