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.
error | A GError. |
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.
error | A Glib::Error. |
true
if error represents an error from a remote peer, false
otherwise. 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.
error | A GError. |
true
if information was stripped, false
otherwise.