Gio.DBusMessage.prototype.to_gerror
function to_gerror(): Boolean { // Gjs wrapper for g_dbus_message_to_gerror() }
If message is not of type Gio.DBusMessageType.error does nothing and returns false.
Otherwise this method encodes the error in message as a GLib.Error using Gio.DBusError.set_dbus_error using the information in the Gio.DBusMessageHeaderField.error_name header field of message as well as the first string item in message's body.
Since 2.26
- Returns
true if @error was set, false otherwise.