exposing dbus error names on the glib client side

David Malcolm dmalcolm at redhat.com
Fri Jun 24 08:54:54 PDT 2005


On Wed, 2005-06-22 at 12:09 -0700, Ryan Gammon wrote:
> Colin Walters wrote:
> 
> >But this is pretty busted, since you can't reasonably determine what the
> >error is on the client end (a hack like looking for "D-BUS error" is
> >bound to fail since the string is translated).
> >
> >My other thought is to ditch GError and create DBusGError.  Somewhat
> >less pleasant though, since people are going to expect GError.
> >  
> >
> 
> If you went the way of DBusGError, it might be nice to derive it from a 
> GObject base class that others needing extensible error objects could use.
> 
> Eg, I've got the same problem wrapping helix errors -- I need to stick a 
> hex error code somewhere in the GError, and I couldn't find a good way 
> to do it.
> 
> The base class could provide GError-like functionality. I could do 
> HX_IS_G_ERROR / DBUS_IS_G_ERROR if I needed error details like the helix 
> error code, or the dbus error name.

A couple of years ago I tried patching glib to support
domain/code-specific user-data; I attached a patch here:
http://bugzilla.gnome.org/show_bug.cgi?id=124022

This never got beyond the idea stage, though.




More information about the dbus mailing list