lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [PATCH] Add undisplayable_exception


From: Greg Chicares
Subject: Re: [lmi] [PATCH] Add undisplayable_exception
Date: Sat, 11 Oct 2014 00:12:05 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

On 2014-10-09 14:40Z, Vadim Zeitlin wrote:
[...]
>  So the best I can do is the patch below, please let me know if you see a
> way of improving it, i.e. minimizing the changes to the production version
> even further.

It's hard to explain how utterly averse to abrupt termination our users are,
but that's reason enough to do the following, in addition to everything else
we've already done for safety--unless you see a reason not to; but AFAICT
the 'wx_test' program doesn't *exercise* 'main_wx.cpp', but completely
*replaces* it, so this should be harmless, no? (Of course it would be wrong
to special-case class wx_test_exception in exception traps in other '.cpp'
files such as 'skeleton.cpp'.)

Index: main_wx.cpp
===================================================================
--- main_wx.cpp (revision 5978)
+++ main_wx.cpp (working copy)
@@ -36,6 +36,7 @@
 #   pragma hdrstop
 #endif

+#include "alert.hpp"                    // safely_show_message()
 #include "fenv_lmi.hpp"
 #include "force_linking.hpp"
 #include "handle_exceptions.hpp"
@@ -98,6 +99,11 @@
         result = wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
 #endif // LMI_MSW defined.
         }
+    catch(wx_test_exception const&)
+        {
+        result = EXIT_FAILURE;
+        safely_show_message("Logic error: caught 'wx_test_exception'.");
+        }
     catch(...)
         {
         report_exception();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]