Task.reportError

void reportError(gobject.object.ObjectWrap sourceObject, gio.types.AsyncReadyCallback callback, void * sourceTag, glib.error.ErrorWrap error)

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

sourceObjectthe #GObject that owns this task, or null.
callbacka #GAsyncReadyCallback.
sourceTagan opaque pointer indicating the source of this task
errorerror to report