return_error


Description:

[ DestroysInstance ]
public void return_error (Quark domain, int code, string format, ...)

Finishes handling a D-Bus method call by returning an error.

See encode_gerror for details about what error name will be returned on the wire. In a nutshell, if the given error is registered using register_error the name given during registration is used. Otherwise, a name of the form `org.gtk.GDBus.UnmappedGError.Quark...` is used. This provides transparent mapping of Error between applications using GDBus.

If you are writing an application intended to be portable, always register errors with register_error or use return_dbus_error.

This method will take ownership of this. See DBusInterfaceVTable for more information about the ownership of this.

Since 2.48, if the method call requested for a reply not to be sent then this call will free this but otherwise do nothing (as per the recommendations of the D-Bus specification).

Parameters:

this

A DBusMethodInvocation.

domain

A Quark for the Error error domain.

code

The error code.

format

printf-style format.

...

Parameters for format.