forked from AuroraMiddleware/gtk
GDK W32: Print error code along with the error message
Error codes can be easily looked up in an error code list and/or googled up. Error messages, while descriptive, often describe the wrong thing, and the messages themselves are not part of the documentation of a function, unlike error codes. It would be preferable to have the code, or both. https://bugzilla.gnome.org/show_bug.cgi?id=763913
This commit is contained in:
parent
c4c00299b2
commit
692c3b11ff
@ -136,8 +136,9 @@ void
|
||||
_gdk_win32_api_failed (const gchar *where,
|
||||
const gchar *api)
|
||||
{
|
||||
gchar *msg = g_win32_error_message (GetLastError ());
|
||||
g_warning ("%s: %s failed: %s", where, api, msg);
|
||||
DWORD error_code = GetLastError ();
|
||||
gchar *msg = g_win32_error_message (error_code);
|
||||
g_warning ("%s: %s failed with code %lu: %s", where, api, error_code, msg);
|
||||
g_free (msg);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user