UnknownMethod vs. UnknownProperty

Thiago Macieira thiago at kde.org
Wed Mar 9 10:37:43 PST 2011


On Wednesday, 9 de March de 2011 18:27:40 Lennart Poettering wrote:
> On Wed, 09.03.11 16:25, Lennart Poettering (mzqohf at 0pointer.de) wrote:
> 
> Heya,
> 
> > So, is introducing UnknownProperty a good idea? I say yes, what says
> > you?

Yes, it is.

> 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. So, while I am at it, I should probably
> add an error for that too. Suggestions for a name for this?
> 
> ReadOnlyProperty?
> PropertyNotWritable?
> BadAccess?

QtDBus uses org.freedesktop.DBus.Error.InvalidArgs for both cases. I'll be 
glad to change to the more descriptive errors.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20110309/236a03a2/attachment.pgp>


More information about the dbus mailing list