Sets the result from error, and takes over the caller's ownership of error, so the caller does not need to free it any more.
error
a SimpleAsyncResult
a Error