Skip to content

Add UV_RUNTIME_CHECK() macro to print uv_strerror()

Ondřej Surý requested to merge ondrej/add-UV_RUNTIME_CHECK-macro-v9_18 into v9_18

When libuv functions fail, they return correct return value that could be useful for more detailed debugging. Currently, we usually just check whether the return value is 0 and invoke assertion error if it doesn't throwing away the details why the call has failed. Unfortunately, this often happen on more exotic platforms.

Add a UV_RUNTIME_CHECK() macro that can be used to print more detailed error message (via uv_strerror() before ending the execution of the program abruptly with the assertion.

(cherry picked from commit 62e15bb0)

Merge request reports