# Gio::DBus::Error Namespace Reference

## Enumerations

enum

DBusError {
DBUS_ERROR_FAILED,
DBUS_ERROR_NO_MEMORY,
DBUS_ERROR_SERVICE_UNKNOWN,
DBUS_ERROR_NAME_HAS_NO_OWNER,
DBUS_ERROR_NO_REPLY,
DBUS_ERROR_IO_ERROR,
DBUS_ERROR_BAD_ADDRESS,
DBUS_ERROR_NOT_SUPPORTED,
DBUS_ERROR_LIMITS_EXCEEDED,
DBUS_ERROR_ACCESS_DENIED,
DBUS_ERROR_AUTH_FAILED,
DBUS_ERROR_NO_SERVER,
DBUS_ERROR_TIMEOUT,
DBUS_ERROR_NO_NETWORK,
DBUS_ERROR_ADDRESS_IN_USE,
DBUS_ERROR_DISCONNECTED,
DBUS_ERROR_INVALID_ARGS,
DBUS_ERROR_FILE_NOT_FOUND,
DBUS_ERROR_FILE_EXISTS,
DBUS_ERROR_UNKNOWN_METHOD,
DBUS_ERROR_TIMED_OUT,
DBUS_ERROR_MATCH_RULE_NOT_FOUND,
DBUS_ERROR_MATCH_RULE_INVALID,
DBUS_ERROR_SPAWN_EXEC_FAILED,
DBUS_ERROR_SPAWN_FORK_FAILED,
DBUS_ERROR_SPAWN_CHILD_EXITED,
DBUS_ERROR_SPAWN_CHILD_SIGNALED,
DBUS_ERROR_SPAWN_FAILED,
DBUS_ERROR_SPAWN_SETUP_FAILED,
DBUS_ERROR_SPAWN_CONFIG_INVALID,
DBUS_ERROR_SPAWN_SERVICE_INVALID,
DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND,
DBUS_ERROR_SPAWN_PERMISSIONS_INVALID,
DBUS_ERROR_SPAWN_FILE_INVALID,
DBUS_ERROR_SPAWN_NO_MEMORY,
DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN,
DBUS_ERROR_INVALID_SIGNATURE,
DBUS_ERROR_INVALID_FILE_CONTENT,
DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN,
DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN,
DBUS_ERROR_OBJECT_PATH_IN_USE
}

## Functions

bool | is_remote_error (const Glib::Error& error)
| Checks if error represents an error received via D-Bus from a remote peer.
Glib::ustring | get_remote_error (const Glib::Error& error)
| Gets the D-Bus error name used for error, if any.
bool | strip_remote_error (Glib::Error& error)
| Looks for extra information in the error message used to recover the D-Bus error name and strips it if found.

## Function Documentation

Glib::ustring Gio::DBus::Error::get_remote_error | ( | const Glib::Error& | error | ) |

Gets the D-Bus error name used for error, if any.

This function is guaranteed to return a D-Bus error name for all Glib::Error instances returned from functions handling remote method calls (e.g. Gio::DBusConnection::call_finish()) unless strip_remote_error() has been used on error.

Parameters:

  | error | A GError.

Returns:
  An allocated string or 0 if the D-Bus error name could not be found.

Since glibmm 2.26:

bool Gio::DBus::Error::is_remote_error | ( | const Glib::Error& | error | ) |

Checks if error represents an error received via D-Bus from a remote peer.

If so, use get_remote_error() to get the name of the error.

Parameters:

  | error | A Glib::Error.

Returns:
  `true` if error represents an error from a remote peer, `false` otherwise.

Since glibmm 2.26:

bool Gio::DBus::Error::strip_remote_error | ( | Glib::Error& | error | ) |

Looks for extra information in the error message used to recover the D-Bus error name and strips it if found.

If stripped, the message field in error will correspond exactly to what was received on the wire.

This is typically used when presenting errors to the end user.

Parameters:

  | error | A GError.

Returns:
  `true` if information was stripped, `false` otherwise.

Since glibmm 2.26: