Use g_win32_error_message to beautify error messages.

2001-06-07  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

	* gthread-win32.c: Use g_win32_error_message to beautify error
	messages.
This commit is contained in:
Sebastian Wilhelmi 2001-06-07 10:34:22 +00:00 committed by Sebastian Wilhelmi
parent 4d2b54ff8b
commit 9600d5cd53
2 changed files with 11 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2001-06-07 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* gthread-win32.c: Use g_win32_error_message to beautify error
messages.
2001-05-24 Hans Breuer <hans@breuer.org>
* makefile.msc.in : pthread isn't required anymore

View File

@ -47,9 +47,9 @@
#define win32_check_for_error(what) G_STMT_START{ \
if (!(what)) \
g_error ("file %s: line %d (%s): error %ld during %s", \
g_error ("file %s: line %d (%s): error %s during %s", \
__FILE__, __LINE__, G_GNUC_PRETTY_FUNCTION, \
GetLastError (), #what); \
g_win32_error_message (GetLastError ()), #what); \
}G_STMT_END
#define G_MUTEX_SIZE (sizeof (HANDLE))
@ -467,9 +467,11 @@ g_thread_create_win32_impl (GThreadFunc func,
if (retval->thread == NULL)
{
g_free (retval);
gchar *win_error = g_win32_error_message (GetLastError ());
g_set_error (error, G_THREAD_ERROR, G_THREAD_ERROR_AGAIN,
"Error creating thread: %ld", GetLastError());
"Error creating thread: %s", win_error);
g_free (retval);
g_free (win_error);
return;
}