[project @ 2005-11-28 14:39:47 by simonmar]
[ghc-hetmet.git] / ghc / rts / RtsMessages.c
index 5df2fe4..a690614 100644 (file)
@@ -114,21 +114,15 @@ rtsFatalInternalErrorFn(char *s, va_list ap)
   if (isGUIApp())
   {
      char title[BUFSIZE], message[BUFSIZE];
-     int r;
 
-        r = vsnprintf(title,   BUFSIZE, "%s: internal error", prog_name);
-        if (r > 0 && r < BUFSIZE) {
-                strcpy(title, "internal error");
-     }
+     snprintf(title,   BUFSIZE, "%s: internal error", prog_name);
+     vsnprintf(message, BUFSIZE, s, ap);
 
-        r = vsnprintf(message, BUFSIZE, s, ap);
-        if (r > 0 && r < BUFSIZE) {
-          MessageBox(NULL /* hWnd */,
-         message,
-         title,
-         MB_OK | MB_ICONERROR | MB_TASKMODAL
-         );
-     };
+     MessageBox(NULL /* hWnd */,
+               message,
+               title,
+               MB_OK | MB_ICONERROR | MB_TASKMODAL
+              );
   }
   else
 #endif
@@ -145,7 +139,8 @@ rtsFatalInternalErrorFn(char *s, va_list ap)
      fflush(stderr);
   }
 
-  stg_exit(EXIT_INTERNAL_ERROR);
+  abort();
+  // stg_exit(EXIT_INTERNAL_ERROR);
 }
 
 void