Re: g_assert vs. g_return_if_fail



On 01/20/2010 05:40 PM, Martin Kalbfuß wrote:
> But shouldn't the function return GError in such a case?
> 
> g_return_if_fail is like retunring an error without the ability to
> handle it. I'm still not sure when to use it.


g_return_if_fail() should be used to catch programmer error ONLY.  There is no
point in returning a GError in such cases.


behdad


> I assume g_assert is only useful in programs and internal library
> functions.
> 
> 
> Am Donnerstag, den 21.01.2010, 00:41 +0300 schrieb LRN:
>> nd, AFAIK, it also logs warnings.
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]