exposing dbus error names on the glib client side

Havoc Pennington hp at redhat.com
Thu Jun 23 11:12:52 PDT 2005


On Wed, 2005-06-22 at 20:35 -0400, Colin Walters wrote:
> 
> That would mean interning a new quark for each remote error, which is
> kind of evil, since there's no way to free quarks.
> 

True, but I'm not sure it matters in practice.

Another option might be some kind of dedicated quark-like system but not
GQuark

> But I thought of a semi-clever hack; embed both the error name and
> message inside the GError message string, separated by a null character.
> We then have special accessors to get them.
> 
> This also solves the server side-problem of sending errors; now a server
> method can just call 
> dbus_g_error_set (error, "com.example.Foo.Bar", "blah bla") too.

Seems awfully hacky to me ;-)

Havoc




More information about the dbus mailing list