UnknownMethod vs. UnknownProperty
Lennart Poettering
mzqohf at 0pointer.de
Wed Mar 9 09:27:40 PST 2011
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?
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?
(There's already AccessDenied, but to me this is more about security,
and the comment suggests that too. And in this case things are simply an
invalid access, having nothing to do with security.)
(Or shoulds this just be InvalidArgument?)
I am leaning towards "PropertyNotWritable".
Opinions?
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the dbus
mailing list