Sets task's result to error (which task assumes ownership of)
and completes the task (see Task.returnPointer 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 Task.returnError,
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.
Sets task's result to error (which task assumes ownership of) and completes the task (see Task.returnPointer 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 Task.returnError, 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 Task.returnNewError.