8 #ifndef WPIUTIL_WPI_UV_ERROR_H_
9 #define WPIUTIL_WPI_UV_ERROR_H_
21 Error() : m_err(UV_UNKNOWN) {}
22 explicit Error(
int err) : m_err(err) {}
27 explicit operator bool()
const {
return m_err < 0; }
32 int code()
const {
return m_err; }
37 const char*
str()
const {
return uv_strerror(m_err); }
42 const char*
name()
const {
return uv_err_name(m_err); }
51 #endif // WPIUTIL_WPI_UV_ERROR_H_
const char * str() const
Returns the error message.
Definition: Error.h:37
int code() const
Returns the error code.
Definition: Error.h:32
namespace to hold default to_json function
Definition: SmallString.h:21
Error code.
Definition: Error.h:19
const char * name() const
Returns the error name.
Definition: Error.h:42