Task.reportError

Creates a #GTask and then immediately calls g_task_return_error() 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 g_async_result_is_tagged() 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 g_task_report_new_error().

class Task
static
void
reportError

Parameters

sourceObject ObjectG

the #GObject that owns this task, or %NULL.

callback GAsyncReadyCallback

a #GAsyncReadyCallback.

callbackData void*

user data passed to @callback.

sourceTag void*

an opaque pointer indicating the source of this task

error ErrorG

error to report

Meta

Since

2.36