exposing dbus error names on the glib client side
Ryan Gammon
rgammon at real.com
Wed Jun 22 12:09:42 PDT 2005
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.
--
Ryan Gammon
rgammon at real.com
Developer for Helix Player
https://player.helixcommunity.org
More information about the dbus
mailing list