UnknownMethod vs. UnknownProperty

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Mar 9 09:47:13 PST 2011


On Wed, 09 Mar 2011 at 18:27:40 +0100, Lennart Poettering wrote:
> On Wed, 09.03.11 16:25, Lennart Poettering (mzqohf at 0pointer.de) wrote:
> > So, is introducing UnknownProperty a good idea? I say yes, what says you?
> 
> Hmm, so, if a user calls Get() and specifies a property that doesn't
> exist it will return UnknownProperty in future, but what happens if the
> user calls Set() on a read-only property? None of the current error
> codes really applies to that.

Perhaps merge the stuff I already reviewed, and add UnknownProperty and/or
this new error code afterwards?

For what it's worth, dbus-glib uses AccessDenied if you try to get or set a
property that doesn't exist, or if you try to do something not allowed
by its access.

telepathy-glib's TpDBusPropertiesMixin uses a Telepathy error code
(PermissionDenied) instead, but that's probably just because when I wrote it,
https://bugs.freedesktop.org/show_bug.cgi?id=16776 prevented dbus-glib
services from raising the "well-known" D-Bus errors.

> I am leaning towards "PropertyNotWritable". 

Writable is fairly often (mis-?)spelled Writeable, so I'd suggest avoiding
that word if there's any good alternative.

    S


More information about the dbus mailing list