Re: Error naming convention on dbus

Igor Plastov <[email protected]>
Newsgroups gmane.comp.freedesktop.dbus
Message-ID <CAGTgnLfuHZN1uJD5GWm5bfhSJJ00PTjq7aqxFR-r3TXVDUSpWg@mail.gmail.com>
Hello Gergo,
D-Bus specification:
https://dbus.freedesktop.org/doc/dbus-specification.html#auth-command-future

contains subsection about errors's name:

*Error names*
> Error names have the same restrictions as interface names.
> Error names have the same naming conventions as interface names, and often
> contain .Error.; for instance, the owner of example.com might define the
> errors com.example.MusicPlayer1.Error.FileNotFound and
> com.example.MusicPlayer1.Error.OutOfMemory. The errors defined by D-Bus
> itself, such as org.freedesktop.DBus.Error.Failed, follow a similar
> pattern.


Best regards,
Igor

<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
Без
вирусов. www.avast.ru
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

сб, 6 февр. 2021 г. в 15:20, Zeeshan Ali <[email protected]>:

> Hi,
>
> On Sat, 6 Feb 2021 at 11:45, Nyirő Gergő <gergo-VbCGMPl49+BBDLzU/[email protected]> wrote:
> >
> > Dear list,
> >
> > I would like to ask about the naming convention of dbus errors.
> >
> > I saw the following pattern in dbus libraries: if the response  to the
> > `Set` method of the `org.freedesktop.DBus.Properties` interface is an
> > error then the name of the error is prefixed with
> > `org.freedesktop.DBus.Properties.Error.`.
> >
> > Is it right that the name of the error should correlate with the
> > invoked interface (<interface-name> + ".Error." + <error-type>)?
> >
> > Is there any official rule about the error names?
> > Is there a list of common errors somewhere?
>
> You can find the official rules and recommended conventions about
> error names here:
>
> https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-error
>
> > At first glance it seems that the instrospection data does not contain
> > the possible errors. Is it right or they can be inculded somehow?
>
> Not officially, no but I recall there was a Telepathy extension
> standard for that, although I can't seem to find it right now.
>
> --
> Regards,
>
> Zeeshan Ali
> _______________________________________________
> dbus mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dbus
>

_______________________________________________
dbus mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dbus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.