### Method

# Gio Task return_prefixed_error

since: 2.80

#### Declaration [src]

    void
    g_task_return_prefixed_error (
      GTask* task,
      GError* error,
      const char* format,
      ...
    )

#### Description [src]

Sets `task`‘s result to `error` (which `task` assumes ownership of), with the message prefixed according to `format`, and completes the task (see `g_task_return_pointer()` for more discussion of exactly what this means).

Note that since the task takes ownership of `error`, and since the task may be completed before returning from g_task_return_prefixed_error(), you cannot assume that `error` is still valid after calling this. Call `g_error_copy()` on the error if you need to keep a local copy as well.

See also g_task_return_error(), g_prefix_error().

Available since: 2.80

This method is not directly available to language bindings.

#### Parameters

`error`

  Type: `GError`

  The `GError` result of a task function.

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

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