exposing dbus error names on the glib client side

Colin Walters walters at verbum.org
Sun Jun 26 10:04:49 PDT 2005


On Sun, 2005-06-26 at 11:43 -0400, Havoc Pennington wrote:

> So the user data patch fixes #1, which is slightly cleaner (since e.g.
> we wouldn't crash if trying to use the dbus accessor on a non-dbus
> gerror) but probably not an earth-shattering issue.

True.

> But, I realized #2 is kind of bogus, at least if we make one change to
> your patch: swap the name and message so gerror->message is a
> human-readable string as in a normal GError. So what we have if you use
> the normal GError stuff is:
>   code = SOME_DBUS_ERROR
>   message = "human readable string"
> 
> and there's an extra field available via an extra accessor if you care
> about the dbus details. 

I see your point; that makes sense.  In the case where you're just
propagating the GError up which eventually ends up in some dialog (which
is usually bad, but...) at least the user will see a human-readable
error string instead of like org.freedesktop.Hal.DeviceAlreadyLocked or
whatever.

I made this change and committed the patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/dbus/attachments/20050626/8ae94a62/attachment.pgp


More information about the dbus mailing list