aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winerror.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-11-29 07:56:51 +0100
committermarha <marha@users.sourceforge.net>2012-11-29 07:56:51 +0100
commitd2d73da59e64acdc4718e4e6790a69d967bee875 (patch)
tree5c0148abbbb1473bb80ddc7da286beae9c1f2c3d /xorg-server/hw/xwin/winerror.c
parent38eb7612c4b39dd69df4baf4450ba512e888effa (diff)
downloadvcxsrv-d2d73da59e64acdc4718e4e6790a69d967bee875.tar.gz
vcxsrv-d2d73da59e64acdc4718e4e6790a69d967bee875.tar.bz2
vcxsrv-d2d73da59e64acdc4718e4e6790a69d967bee875.zip
fontconfig xserver mesa git update 29 nov 2012
xserver: 1712a45422a63f11b2146541279616fcfda09ec6 fontconfig: faea1cac85ac3b0fd6a983e1c0adeb68e115e06c mesa: c1023608002c985b9d72edc64732cd666de2a206
Diffstat (limited to 'xorg-server/hw/xwin/winerror.c')
-rw-r--r--xorg-server/hw/xwin/winerror.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/winerror.c b/xorg-server/hw/xwin/winerror.c
index 6645469fc..1318b0f36 100644
--- a/xorg-server/hw/xwin/winerror.c
+++ b/xorg-server/hw/xwin/winerror.c
@@ -59,15 +59,16 @@ OsVendorVErrorF(const char *pszFormat, va_list va_args)
#endif
/*
- * os/util.c/FatalError () calls our vendor ErrorF, so the message
- * from a FatalError will be logged. Thus, the message for the
- * fatal error is not passed to this function.
+ * os/log.c:FatalError () calls our vendor ErrorF, so the message
+ * from a FatalError will be logged.
*
* Attempt to do last-ditch, safe, important cleanup here.
*/
void
OsVendorFatalError(const char *f, va_list args)
{
+ char errormsg[1024] = "";
+
/* Don't give duplicate warning if UseMsg was called */
if (g_fSilentFatalError)
return;
@@ -78,9 +79,28 @@ OsVendorFatalError(const char *f, va_list args)
}
LogClose(EXIT_ERR_ABORT);
- winMessageBoxF("A fatal error has occurred and " PROJECT_NAME
- " will now exit.\n" "Please open %s for more information.\n",
- MB_ICONERROR, (g_pszLogFile ? g_pszLogFile : "the logfile"));
+ /* Format the error message */
+ vsnprintf(errormsg, sizeof(errormsg), f, args);
+
+ /*
+ Sometimes the error message needs a bit of cosmetic cleaning
+ up for use in a dialog box...
+ */
+ {
+ char *s;
+
+ while ((s = strstr(errormsg, "\n\t")) != NULL) {
+ s[0] = ' ';
+ s[1] = '\n';
+ }
+ }
+
+ winMessageBoxF("A fatal error has occurred and " PROJECT_NAME " will now exit.\n\n"
+ "%s\n\n"
+ "Please open %s for more information.\n",
+ MB_ICONERROR,
+ errormsg,
+ (g_pszLogFile ? g_pszLogFile : "the logfile"));
}
/*