Task.reportError

Creates a #GTask and then immediately calls gio.task.Task.returnError on it. Use this in the wrapper function of an asynchronous method when you want to avoid even calling the virtual method. You can then use gio.async_result.AsyncResult.isTagged in the finish method wrapper to check if the result there is tagged as having been created by the wrapper method, and deal with it appropriately if so.

See also gio.task.Task.reportNewError.

Parameters

sourceObject gobject.object.ObjectG

the #GObject that owns this task, or null.

callback gio.types.AsyncReadyCallback

a #GAsyncReadyCallback.

sourceTag void*

an opaque pointer indicating the source of this task

error glib.error.ErrorG

error to report