5#ifndef WPINET_UV_ERROR_H_
6#define WPINET_UV_ERROR_H_
18 explicit Error(
int err) : m_err(err) {}
23 explicit operator bool()
const {
return m_err < 0; }
28 int code()
const {
return m_err; }
41 int m_err{UV_UNKNOWN};
Error code.
Definition: Error.h:15
const char * name() const
Returns the error name.
Definition: Error.h:38
Error(int err)
Definition: Error.h:18
int code() const
Returns the error code.
Definition: Error.h:28
const char * str() const
Returns the error message.
Definition: Error.h:33
UV_EXTERN const char * uv_strerror(int err)
UV_EXTERN const char * uv_err_name(int err)