Sets the result from
error, and takes over the caller’s ownership
error, so the caller does not need to free it any more.
|This method is not directly available to language bindings.|
The data is owned by the caller of the function.