debug: use newer CHECK macros
This commit is contained in:
parent
f32f12ee82
commit
c487a00175
@ -79,7 +79,7 @@ win32_error::win32_error (DWORD _id):
|
|||||||
runtime_error ("Win32 error"),
|
runtime_error ("Win32 error"),
|
||||||
id (_id)
|
id (_id)
|
||||||
{
|
{
|
||||||
CHECK_SOFT (id != ERROR_SUCCESS);
|
CHECK_NEQ (id, ERROR_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ win32_error::win32_error (void):
|
|||||||
runtime_error ("Win32 error"),
|
runtime_error ("Win32 error"),
|
||||||
id (GetLastError ())
|
id (GetLastError ())
|
||||||
{
|
{
|
||||||
CHECK_SOFT (id != ERROR_SUCCESS);
|
CHECK_NEQ (id, ERROR_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ net::error::code_to_string (int code) {
|
|||||||
// It should be fine to signcast the code here as Windows guarantees all
|
// It should be fine to signcast the code here as Windows guarantees all
|
||||||
// error messages are positive but appears to use int for compatibility
|
// error messages are positive but appears to use int for compatibility
|
||||||
DWORD output = FormatMessage (0, NULL, sign_cast<unsigned> (code), 0, message, sizeof (message), NULL);
|
DWORD output = FormatMessage (0, NULL, sign_cast<unsigned> (code), 0, message, sizeof (message), NULL);
|
||||||
CHECK_HARD (output != 0);
|
CHECK_NEQ (output, 0);
|
||||||
|
|
||||||
return std::string (message);
|
return std::string (message);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user