[PATCH 2/3] docs: document the drivers error codes

Tom Gundersen teg at jklm.no
Tue Apr 25 12:53:44 UTC 2017


Document the possible error code during normal operations. Error codes due to
internal errors or configuration errors are not documented and are not really
meant for the client to know what to do with.

Signed-off-by: Tom Gundersen <teg at jklm.no>
---
 doc/dbus-specification.xml | 310 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 303 insertions(+), 7 deletions(-)

diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml
index 7759de36..11530d10 100644
--- a/doc/dbus-specification.xml
+++ b/doc/dbus-specification.xml
@@ -5247,6 +5247,23 @@
               </tbody>
             </tgroup>
           </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.LimitsExceeded</entry>
+                  <entry>The maximum number of active connections have been exceeded</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
         </para>
         <para>
           Before an application is able to send messages to other applications
@@ -5313,6 +5330,31 @@
               </tbody>
             </tgroup>
           </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.InvalidArgs</entry>
+                  <entry>The requested name is reserved or not a valid well-known name</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.AccessDenied</entry>
+                  <entry>Application is not allowed to own name</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.LimitsExceeded</entry>
+                  <entry>The maximum number of names have been exceeded</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
         </para>
         <para>
           Ask the message bus to assign the given name to the method caller. Each
@@ -5546,6 +5588,23 @@
               </tbody>
             </tgroup>
           </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.InvalidArgs</entry>
+                  <entry>The name is reserved or not a valid well-known name</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
         </para>
         <para>
           Ask the message bus to release the method caller's claim to the given
@@ -5641,6 +5700,23 @@
               </tbody>
             </tgroup>
           </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.NameHasNoOwner</entry>
+                  <entry>The name does not exist</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
         </para>
         <para>
           List the connections currently queued for a bus name (see
@@ -5919,6 +5995,31 @@
             </tbody>
           </tgroup>
         </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.LimitsExceeded</entry>
+                  <entry>The maximum number of pending activations has been exceeded</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.ServiceUnknown</entry>
+                  <entry>The name is not activatable</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.AccessDenied</entry>
+                  <entry>The caller does not have permission to activate the service</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
         Tries to launch the executable associated with a name (service
         activation), as an explicit request. This is an alternative to
         relying on auto-starting. For more information on how services
@@ -5996,6 +6097,23 @@
               </tbody>
             </tgroup>
             </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.AccessDenied</entry>
+                  <entry>Invalid object path, or the caller does not have permission to alter the activation environemnt</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
             Normally, session bus activated services inherit the environment of the bus daemon.  This method adds to or modifies that environment when activating services.
         </para>
         <para>
@@ -6052,9 +6170,25 @@
             </tbody>
           </tgroup>
         </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.NameHasNoOwner</entry>
+                  <entry>The name has no owner</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
         Returns the unique connection name of the primary owner of the name
-        given. If the requested name doesn't have an owner, returns a
-        <literal>org.freedesktop.DBus.Error.NameHasNoOwner</literal> error.
+        given.
        </para>
       </sect3>
 
@@ -6105,6 +6239,23 @@
             </tbody>
           </tgroup>
         </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.NameHasNoOwner</entry>
+                  <entry>The name does not exist</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
         Returns the Unix user ID of the process connected to the server. If
         unable to determine it (for instance, because the process is not on the
         same machine as the bus daemon), an error is returned.
@@ -6158,9 +6309,30 @@
             </tbody>
           </tgroup>
         </informaltable>
-        Returns the Unix process ID of the process connected to the server. If
-        unable to determine it (for instance, because the process is not on the
-        same machine as the bus daemon), an error is returned.
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.NameHasNoOwner</entry>
+                  <entry>The name does not exist</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.UnixProcessIdUnknown</entry>
+                  <entry>The process ID could not be determined (for instance,
+                         because the process is not on the same machine as the
+                         bus daemon).</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
+        Returns the Unix process ID of the process connected to the server.
        </para>
       </sect3>
 
@@ -6211,6 +6383,23 @@
             </tbody>
           </tgroup>
         </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.NameHasNoOwner</entry>
+                  <entry>The name does not exist</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
       </para>
 
       <para>
@@ -6373,6 +6562,27 @@
               </tbody>
             </tgroup>
           </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.NameHasNoOwner</entry>
+                  <entry>The name does not exist</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.AdtAuditDataUnknown</entry>
+                  <entry>Could not determine audit session data</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
           Returns auditing data used by Solaris ADT, in an unspecified
           binary format. If you know what this means, please contribute
           documentation via the D-Bus bug tracking system.
@@ -6431,6 +6641,27 @@
               </tbody>
             </tgroup>
           </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.NameHasNoOwner</entry>
+                  <entry>The name does not exist</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown</entry>
+                  <entry>Could not determine security context</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
           Returns the security context used by SELinux, in an unspecified
           format. If you know what this means, please contribute
           documentation via the D-Bus bug tracking system.
@@ -6468,6 +6699,31 @@
               </tbody>
             </tgroup>
           </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.LimitsExceeded</entry>
+                  <entry>The maximum number of match rules have been exceeded</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.MatchRuleInvalid</entry>
+                  <entry>The match rule string is invalid</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.AccessDenied</entry>
+                  <entry>The caller does not have permission to eavesdrop</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
         Adds a match rule to match messages going through the message bus (see <xref linkend='message-bus-routing-match-rules'/>).
         If the bus does not have enough resources the <literal>org.freedesktop.DBus.Error.OOM</literal>
         error is returned.
@@ -6499,9 +6755,28 @@
               </tbody>
             </tgroup>
           </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.MatchRuleInvalid</entry>
+                  <entry>The match rule string is invalid</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.MatchRuleNotFound</entry>
+                  <entry>The match rule was not found</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
         Removes the first rule that matches (see <xref linkend='message-bus-routing-match-rules'/>).
-        If the rule is not found the <literal>org.freedesktop.DBus.Error.MatchRuleNotFound</literal>
-        error is returned.
        </para>
       </sect3>
 
@@ -6572,6 +6847,27 @@
               </tbody>
             </tgroup>
           </informaltable>
+          Error codes:
+          <informaltable>
+            <tgroup cols="2">
+              <thead>
+                <row>
+                  <entry>Error</entry>
+                  <entry>Description</entry>
+                </row>
+              </thead>
+              <tbody>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.AccessDenied</entry>
+                  <entry>Invalid object path, or the caller does not have the permission to eavesdrop</entry>
+                </row>
+                <row>
+                  <entry>org.freedesktop.DBus.Error.MatchRuleInvalid</entry>
+                  <entry>Invalid match rule</entry>
+                </row>
+              </tbody>
+            </tgroup>
+          </informaltable>
         </para>
 
         <para>
-- 
2.12.2



More information about the dbus mailing list