Error naming convention on dbus

Thiago Macieira thiago at kde.org
Sun Feb 7 18:33:17 UTC 2021


On Saturday, 6 February 2021 14:40:57 PST Nyirő Gergő wrote:
> I would like to respond with an error if
> the validation fails. Which would be a better error name:
> a) `org.freedesktop.DBus.Properties.Error.ValidationError`
> b) `org.configd.Error.ValidationError`
> c) replace the standard `org.freedesktop.DBus.Properties.Set` method with a
> custom interface + method for validation

I would say (b). It's certainily not (a) because you're not the authority for 
org.freedesktop.DBus.

Whether you need a separate method or not depends on whether existing callers 
of the current interface can reliably call the enhanced one and expect it to 
work. In this particular case, I think you're safe in just adding more 
possible errors and therefore don t need a new method.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering





More information about the dbus mailing list