Errors and the introspection format

Matthew Johnson dbus at
Fri Feb 17 04:57:51 PST 2006

On Fri, 17 Feb 2006, Thiago Macieira wrote:

> I don't know how the Java bindings work in this aspect, but I'd suggest
> you use one wrapper "D-Bus error" throwable that can be thrown from any
> method, in case you get an unknown error from a remote program. It might
> even be a superclass for all other D-Bus throwables.

This is exactly what I do

> This would allow users to catch unexpected exceptions when dealing with an
> arbitrary program, but also named or typed exceptions when dealing with a
> well-behaved program.

Yup, this was my plan.

> FYI, the programming practice in Qt and KDE programs is to not use
> exceptions at all, so you may expect that error conditions be returned as
> normal return messages, not error ones.

otoh given the existence of errors in dbus, and the need to handle them
anyway, I think good practice should be to use them.


Matthew Johnson

More information about the dbus mailing list