public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [PATCH setup] Don't fatal() on unexpected early window messages
@ 2017-11-09  9:47 Jon Turney
  0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2017-11-09  9:47 UTC (permalink / raw)
  To: cygwin-apps; +Cc: Jon Turney

There's no good reason for this to be immediately fatal, and we have at
least one report of this happening [1], so don't fatal(), just warn.

[1] https://cygwin.com/ml/cygwin/2017-07/msg00428.html
---
 res.rc     | 1 -
 resource.h | 1 -
 window.cc  | 4 +++-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/res.rc b/res.rc
index 40e464b..09b3fc0 100644
--- a/res.rc
+++ b/res.rc
@@ -528,7 +528,6 @@ BEGIN
     IDS_INSTALL_INCOMPLETE  "Installation incomplete.  Check %s for details"
     IDS_CORRUPT_PACKAGE     "Package file %s has a corrupt local copy, please remove and retry."
     IDS_SKIP_PACKAGE	    "%s\nDo you want to skip this package ?"
-    IDS_WINDOW_INIT_BADMSG  "Fatal Error: Unexpected windows message %u received too early in window initialization."
     IDS_UNCAUGHT_EXCEPTION  "Fatal Error: Uncaught Exception\nThread: %s\nType: %s\nMessage: %s"
     IDS_UNCAUGHT_EXCEPTION_WITH_ERRNO  "Fatal Error: Uncaught Exception\nThread: %s\nType: %s\nMessage: %s\nAppErrNo: %d"
     IDS_TRUSTKEEP_TOOLTIP   "Sets all packages to their currently installed "
diff --git a/resource.h b/resource.h
index b6685e5..fdebc8f 100644
--- a/resource.h
+++ b/resource.h
@@ -20,7 +20,6 @@
 #define IDS_REBOOT_REQUIRED               118
 #define IDS_CORRUPT_PACKAGE               119
 #define IDS_INSTALL_ERROR                 120
-#define IDS_WINDOW_INIT_BADMSG            121
 #define IDS_UNCAUGHT_EXCEPTION            122
 #define IDS_UNCAUGHT_EXCEPTION_WITH_ERRNO 123
 #define IDS_SKIP_PACKAGE                  124
diff --git a/window.cc b/window.cc
index d97ef6a..c4006d6 100644
--- a/window.cc
+++ b/window.cc
@@ -79,7 +79,9 @@ Window::FirstWindowProcReflector (HWND hwnd, UINT uMsg, WPARAM wParam,
   else
     {
       // Should never get here.
-      fatal(NULL, IDS_WINDOW_INIT_BADMSG, uMsg);
+      Log (LOG_PLAIN) << "Warning: Unexpected windows message " << uMsg
+                      << "received early in window initialization."
+                      << endLog;
     }
 
   return wnd->WindowProc (uMsg, wParam, lParam);
-- 
2.15.0

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-11-09  9:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-09  9:47 [PATCH setup] Don't fatal() on unexpected early window messages Jon Turney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).