Use of org.freedesktop.DBus.Error

Thomas Downing tdowning at bomgar.com
Tue Sep 15 11:01:21 PDT 2015


On Tuesday, September 15, 2015 12:29:40 Simon McVittie wrote:
> On 15/09/15 16:13, Thomas Downing wrote:
> > 1. where can I find the specification for org.freedesktop.DBus.Error?  Or
> > a list of all the defined error names for the same (e.g. UnknownMethod,
> > etc.).
> 
> See dbus/dbus-protocol.h in the reference implementation (libdbus).
> 
> > 2. If a process experiences an error while servicing a method call, but
> > it is not a fatal error (the process is still consistent and operating),
> > what is the prefered error name under org.freedesktop.DBus.Error, if
> > there is such?
> 
[snip]
> 
> I would advise not using the well-known error strings in dbus-protocol.h
> unless they fit your situation perfectly; they are mostly there to be
> used by dbus-daemon itself, or by D-Bus libraries such as libdbus or
> GDBus, to report errors relating to the D-Bus protocol.

That is very good to know.  I will follow that advice.

Thanks again for the quick response,

Thomas

<opinion ignore="as you like">

Not a dbus issue per se I know:

The larger picture as it seems to me, is that published standards (such as 
org.freedesktop.StatusNotifierItem, in my case) should also specify a set of 
error names to be used by those implementing the standards.  Absent that, 
having an error name in an error message doesn't seem have any value beyond 
that of the free form error string also allowed in an error message.

</opinion>



More information about the dbus mailing list