]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add UV_RUNTIME_CHECK() macro to print uv_strerror()
authorOndřej Surý <ondrej@isc.org>
Tue, 15 Feb 2022 13:44:29 +0000 (14:44 +0100)
committerOndřej Surý <ondrej@isc.org>
Wed, 16 Feb 2022 10:46:10 +0000 (11:46 +0100)
commit88751da1145e1bbc4ed32fd100184f3f0d7e2ad1
treea10f0203fc6161b9ccf259957eede933536dac7e
parentcff0d3fbd0b3734b835f98f75c4d6c211fb32dbe
Add UV_RUNTIME_CHECK() macro to print uv_strerror()

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 62e15bb06db5e7d209e8c20d7bdb1501df7dfba8)
lib/isc/netmgr/netmgr-int.h