The pthread functions return errno values in their return code. You can save it and use ``GetErrorStrFromCode(saved_value)`` to get the error string.