Nah, don't use FatalAppExit(). abort() is better.

This commit is contained in:
Tor Lillqvist 2005-01-19 02:27:37 +00:00
parent a4bfec4f1d
commit b45420bca8
5 changed files with 7 additions and 13 deletions

View File

@ -5,7 +5,7 @@
* glib/gmessages.c (g_logv): For fatal messages on Win32, use
G_BREAKPOINT() also without G_ENABLE_DEBUG, but only if being
debugged. Suggestion by Ulf Lamping. Otherwise use FatalAppExit().
debugged. Suggestion by Ulf Lamping.
2005-01-18 Matthias Clasen <mclasen@redhat.com>

View File

@ -5,7 +5,7 @@
* glib/gmessages.c (g_logv): For fatal messages on Win32, use
G_BREAKPOINT() also without G_ENABLE_DEBUG, but only if being
debugged. Suggestion by Ulf Lamping. Otherwise use FatalAppExit().
debugged. Suggestion by Ulf Lamping.
2005-01-18 Matthias Clasen <mclasen@redhat.com>

View File

@ -5,7 +5,7 @@
* glib/gmessages.c (g_logv): For fatal messages on Win32, use
G_BREAKPOINT() also without G_ENABLE_DEBUG, but only if being
debugged. Suggestion by Ulf Lamping. Otherwise use FatalAppExit().
debugged. Suggestion by Ulf Lamping.
2005-01-18 Matthias Clasen <mclasen@redhat.com>

View File

@ -5,7 +5,7 @@
* glib/gmessages.c (g_logv): For fatal messages on Win32, use
G_BREAKPOINT() also without G_ENABLE_DEBUG, but only if being
debugged. Suggestion by Ulf Lamping. Otherwise use FatalAppExit().
debugged. Suggestion by Ulf Lamping.
2005-01-18 Matthias Clasen <mclasen@redhat.com>

View File

@ -476,17 +476,11 @@ g_logv (const gchar *log_domain,
#ifdef G_OS_WIN32
gchar *locale_msg = g_locale_from_utf8 (fatal_msg_buf, -1, NULL, NULL, NULL);
MessageBox (NULL, locale_msg, NULL,
MB_ICONERROR|MB_SETFOREGROUND);
if (IsDebuggerPresent () && !(test_level & G_LOG_FLAG_RECURSION))
{
MessageBox (NULL, locale_msg, NULL,
MB_ICONERROR|MB_SETFOREGROUND);
G_BREAKPOINT ();
}
G_BREAKPOINT ();
FatalAppExit (0, locale_msg);
/* In case somebody runs a debug Windows and chooses to
* continue, don't let her.
*/
abort ();
#else
#if defined (G_ENABLE_DEBUG) && defined (SIGTRAP)