<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
- information for a <filename>sd-bus</filename> error.
- Functions described below can be used to set and query fields in
+ information for a <filename>sd-bus</filename> error. The
+ functions described below can be used to set and query fields in
this structure. The <structfield>name</structfield> field contains a
short identifier of an error. It should follow the rules for error
names described in the D-Bus specification, subsection <ulink
this structure. The <structfield>name</structfield> field contains a
short identifier of an error. It should follow the rules for error
names described in the D-Bus specification, subsection <ulink
<para><function>sd_bus_error_set</function> will return an
errno-like negative value returned based on parameter
<parameter>name</parameter> (see
<para><function>sd_bus_error_set</function> will return an
errno-like negative value returned based on parameter
<parameter>name</parameter> (see
Various well-known D-Bus errors are converted to specific values,
and the remaining ones to <constant>-ENXIO</constant>. Well-known
D-Bus error names are available as constants
<constant>SD_BUS_ERROR_FAILED</constant>, etc., listed above. If
<parameter>name</parameter> is <constant>NULL</constant>, it is
Various well-known D-Bus errors are converted to specific values,
and the remaining ones to <constant>-ENXIO</constant>. Well-known
D-Bus error names are available as constants
<constant>SD_BUS_ERROR_FAILED</constant>, etc., listed above. If
<parameter>name</parameter> is <constant>NULL</constant>, it is
<para><function>sd_bus_error_setf</function> is similar to
<function>sd_bus_error_set</function>, but takes a
<para><function>sd_bus_error_setf</function> is similar to
<function>sd_bus_error_set</function>, but takes a
<para><function>sd_bus_error_set_errnof</function> is similar to
<function>sd_bus_error_set_errno</function>, but in addition to
<parameter>name</parameter>, takes a
<para><function>sd_bus_error_set_errnof</function> is similar to
<function>sd_bus_error_set_errno</function>, but in addition to
<parameter>name</parameter>, takes a
format and corresponding arguments.
<structfield>name</structfield> will be generated from
<parameter>format</parameter> and the arguments.</para>
format and corresponding arguments.
<structfield>name</structfield> will be generated from
<parameter>format</parameter> and the arguments.</para>
- <para><function>sd_bus_error_get_errno</function> is will convert
- <structname>e->name</structname> to an errno-like value using the
+ <para><function>sd_bus_error_get_errno</function> will convert
+ <structname>e->name</structname> to an errno-like value using the
same rules as <function>sd_bus_error_set</function>. If
<parameter>e</parameter> is <constant>NULL</constant>, 0 will be
returned.</para>
same rules as <function>sd_bus_error_set</function>. If
<parameter>e</parameter> is <constant>NULL</constant>, 0 will be
returned.</para>
<para><function>sd_bus_error_free</function> will destroy resources
held by <parameter>e</parameter>. The parameter itself will not
be deallocated, and must be
<para><function>sd_bus_error_free</function> will destroy resources
held by <parameter>e</parameter>. The parameter itself will not
be deallocated, and must be
<para><function>sd_bus_error_get_errno</function> returns
<constant>false</constant> when <parameter>e</parameter> is
<constant>NULL</constant>, and a positive errno value mapped from
<para><function>sd_bus_error_get_errno</function> returns
<constant>false</constant> when <parameter>e</parameter> is
<constant>NULL</constant>, and a positive errno value mapped from
<para><function>sd_bus_error_copy</function> returns 0 or a
positive integer on success, and one of the negative error values
<para><function>sd_bus_error_copy</function> returns 0 or a
positive integer on success, and one of the negative error values
<para><function>sd_bus_error_is_set</function> returns
<constant>true</constant> when <parameter>e</parameter> and
<para><function>sd_bus_error_is_set</function> returns
<constant>true</constant> when <parameter>e</parameter> and
<constant>false</constant> otherwise.</para>
<para><function>sd_bus_error_has_name</function> returns
<constant>true</constant> when <parameter>e</parameter> is
<constant>false</constant> otherwise.</para>
<para><function>sd_bus_error_has_name</function> returns
<constant>true</constant> when <parameter>e</parameter> is
is equal to <parameter>name</parameter>,
<constant>false</constant> otherwise.</para>
</refsect1>
is equal to <parameter>name</parameter>,
<constant>false</constant> otherwise.</para>
</refsect1>
<listitem><para>Error was already set in
<structname>sd_bus_error</structname> structure when one the
<listitem><para>Error was already set in
<structname>sd_bus_error</structname> structure when one the
<para><function>sd_bus_set_error()</function> and other functions
described here are available as a shared library, which can be
compiled and linked to with the
<para><function>sd_bus_set_error()</function> and other functions
described here are available as a shared library, which can be
compiled and linked to with the
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,