DBusError

Members

Static functions

encodeGerror
string encodeGerror(ErrorG error)

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

getRemoteError
string getRemoteError(ErrorG error)

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

isRemoteError
bool isRemoteError(ErrorG error)

Checks if @error represents an error received via D-Bus from a remote peer. If so, use g_dbus_error_get_remote_error() to get the name of the error.

newForDbusError
ErrorG newForDbusError(string dbusErrorName, string dbusErrorMessage)

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

quark
GQuark quark()
registerError
bool registerError(GQuark 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, GDBusErrorEntry[] entries)

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

stripRemoteError
bool stripRemoteError(ErrorG 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(GQuark errorDomain, int errorCode, string dbusErrorName)

Destroys an association previously set up with g_dbus_error_register_error().

Meta