Gio.SimpleAsyncResult.new_take_error
Description: Reference for Gio.SimpleAsyncResult.new_take_error

### Constructor

# Gio SimpleAsyncResultnew_take_error

deprecated: 2.46 since: 2.28

#### Declaration [src]

    GSimpleAsyncResult*
    g_simple_async_result_new_take_error (
      GObject* source_object,
      GAsyncReadyCallback callback,
      gpointer user_data,
      GError* error
    )

#### Description [src]

Creates a `GSimpleAsyncResult` from an error condition, and takes over the caller’s ownership of `error`, so the caller does not need to free it anymore.

Available since: 2.28

Deprecated since: 2.46

Use `g_task_new()` and `g_task_return_error()` instead.

This constructor is not directly available to language bindings.

#### Parameters

`source_object`

  Type: `GObject`

  A `GObject`, or `NULL`.

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

`callback`

  Type: `GAsyncReadyCallback`

  A `GAsyncReadyCallback`.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  User data passed to `callback`.

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

`error`

  Type: `GError`

  A `GError`.

  The data is owned by the caller of the function.

#### Return value

Type: `GSimpleAsyncResult`

A `GSimpleAsyncResult`.

The caller of the function takes ownership of the data, and is responsible for freeing it.