While implementing the Pact FFI for Pact Python, I discovered that there is an inconsistency between the documented return value for the get_error_message FFI, and what it actually returns.
The documentation says that the return value is the number of bytes return to the buffer:
Return Codes
The number of bytes written to the provided buffer, which may be zero if there is no last error.
However an initial implementation returned 0, despite bytes having been written:
While implementing the Pact FFI for Pact Python, I discovered that there is an inconsistency between the documented return value for the
get_error_message
FFI, and what it actually returns.The documentation says that the return value is the number of bytes return to the buffer:
However an initial implementation returned 0, despite bytes having been written:
Which produces the following output:
I don't know whether this is an error in the implementation of the function, or in the documentation.