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

Re: [libvirt] g_error considered harmful



On Mon, Jan 16, 2012 at 03:01:00PM +0100, Christophe Fergeau wrote:
> Hi,
> 
> g_error calls abort() when it's called, thus it should only be used for
> bad assertion failures. We currently are using it in some places in
> libvirt-gobject as if it was g_warning. This patch series gets rid of most
> occurrences of g_error by either replacing it with g_warning or by adding a
> GError ** argument to  the function calling g_error.

And I forgot to mention that the only remaining use of g_error are in
gvir_init_object and gvir_init_config where it's probably acceptable to die
if things didn't work as expected.

Christophe

Attachment: pgpB33vwRwumI.pgp
Description: PGP signature


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