### Constructor

# Gio SimpleAsyncResult new_error

deprecated: 2.46

#### Declaration

    GSimpleAsyncResult*
    g_simple_async_result_new_error (
      GObject* source_object,
      GAsyncReadyCallback callback,
      gpointer user_data,
      GQuark domain,
      gint code,
      const char* format,
      ...
    )

#### Description

Creates a new `GSimpleAsyncResult` with a set error.

Deprecated since: 2.46

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

This method 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.

`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`.

#### Return value

Type: `GSimpleAsyncResult`

A `GSimpleAsyncResult`.

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