aboutsummaryrefslogtreecommitdiff
path: root/docs/src/errors.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/errors.rst')
-rw-r--r--docs/src/errors.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/src/errors.rst b/docs/src/errors.rst
index 2ebaf1e4..4e30447b 100644
--- a/docs/src/errors.rst
+++ b/docs/src/errors.rst
@@ -332,3 +332,13 @@ API
Returns the error name for the given error code. Leaks a few bytes
of memory when you call it with an unknown error code.
+
+.. c:function:: int uv_translate_sys_error(int sys_errno)
+
+ Returns the libuv error code equivalent to the given platform dependent error
+ code: POSIX error codes on Unix (the ones stored in `errno`), and Win32 error
+ codes on Windows (those returned by `GetLastError()` or `WSAGetLastError()`).
+
+ If `sys_errno` is already a libuv error, it is simply returned.
+
+ .. versionchanged:: 1.10.0 function declared public.