takeError

fun takeError(sourceObject: <Error class: unknown class>? = null, callback: AsyncReadyCallback?, error: <Error class: unknown class>): SimpleAsyncResult(source)

⚠️ Deprecated ⚠️

This is deprecated since version 2.46.

Use g_task_new() and g_task_return_error() instead.

---

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.

Return

a #GSimpleAsyncResult

Since

2.28

Parameters

sourceObject

a #GObject, or null

callback

a #GAsyncReadyCallback.

error

a #GError