Function

GioTaskreport_new_error

since: 2.36

Declaration

void
g_task_report_new_error (
  GObject* source_object,
  GAsyncReadyCallback callback,
  gpointer callback_data,
  gpointer source_tag,
  GQuark domain,
  gint code,
  const char* format,
  ...
)

Description

Creates a GTask and then immediately calls g_task_return_new_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_error().

Available since: 2.36

This function is not directly available to language bindings.

Parameters

source_object

Type: GObject

The GObject that owns this task, or NULL.

The argument can be NULL.
The data is owned by the caller of the function.
callback

Type: GAsyncReadyCallback

A GAsyncReadyCallback.

callback_data

Type: gpointer

User data passed to callback.

The argument can be NULL.
The data is owned by the caller of the function.
source_tag

Type: gpointer

An opaque pointer indicating the source of this task.

The argument can be NULL.
The data is owned by the caller of the function.
domain

Type: GQuark

A GQuark.

code

Type: gint

An error code.

format

Type: const char*

A string with format characters.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
...

Type: 

A list of values to insert into format.