Indicate that the serialization has ended with an error.
This function consumes @error.
a GError
GError