DBusError

Namespace for DBusError enum

Members

Static functions

encodeGerror
string encodeGerror(glib.error.ErrorWrap error)

Creates a D-Bus error name to use for error. If error matches a registered error (cf. gio.global.dbusErrorRegisterError), the corresponding D-Bus error name will be returned.

getRemoteError
string getRemoteError(glib.error.ErrorWrap error)

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

isRemoteError
bool isRemoteError(glib.error.ErrorWrap error)

Checks if error represents an error received via D-Bus from a remote peer. If so, use gio.global.dbusErrorGetRemoteError to get the name of the error.

newForDbusError
glib.error.ErrorWrap newForDbusError(string dbusErrorName, string dbusErrorMessage)

Creates a #GError based on the contents of dbus_error_name and dbus_error_message.

quark
glib.types.Quark quark()
registerError
bool registerError(glib.types.Quark errorDomain, int errorCode, string dbusErrorName)

Creates an association to map between dbus_error_name and #GErrors specified by error_domain and error_code.

registerErrorDomain
void registerErrorDomain(string errorDomainQuarkName, size_t quarkVolatile, gio.dbus_error_entry.DBusErrorEntry[] entries)

Helper function for associating a #GError error domain with D-Bus error names.

stripRemoteError
bool stripRemoteError(glib.error.ErrorWrap 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.

unregisterError
bool unregisterError(glib.types.Quark errorDomain, int errorCode, string dbusErrorName)

Destroys an association previously set up with gio.global.dbusErrorRegisterError.