Function translate

Synopsis

#include <src/uvw/emitter.h>

static int translate(int sys) noexcept

Description

Returns the libuv error code equivalent to the given platform dependent error code.

It returns:

  • POSIX error codes on Unix (the ones stored in errno).
  • Win32 error codes on Windows (those returned by GetLastError() or WSAGetLastError()).

If sys is already a libuv error code, it is simply returned.

Parameters

sys - A platform dependent error code.

Returns
The libuv error code equivalent to the given platform dependent error code.

Source

Lines 11-13 in src/uvw/emitter.cpp. Line 42 in src/uvw/emitter.h.

UVW_INLINE int ErrorEvent::translate(int sys) noexcept {
    return uv_translate_sys_error(sys);
}





Add Discussion as Guest

Log in