summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
864c08b)
Windows CE doesn't have abort() so provide a wrapper which can be used even
there (see #13847).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70311
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#define wxASSERT_LEVEL_2(cond)
#endif
#define wxASSERT_LEVEL_2(cond)
#endif
+// This is simply a wrapper for the standard abort() which is not available
+// under all platforms.
+//
+// It isn't really debug-related but there doesn't seem to be any better place
+// for it, so declare it here and define it in appbase.cpp, together with
+// wxTrap().
+extern void WXDLLIMPEXP_BASE wxAbort();
/*
wxCHECK macros always check their conditions, setting debug level to 0 only
/*
wxCHECK macros always check their conditions, setting debug level to 0 only
/** @addtogroup group_funcmacro_debug */
//@{
/** @addtogroup group_funcmacro_debug */
//@{
+/**
+ Exits the program immediately.
+
+ This is a simple wrapper for the standard abort() function which is not
+ available under all platforms (currently only Windows CE doesn't provide
+ it).
+
+ @since 2.9.4
+ */
+void wxAbort();
+
+void wxAbort()
+{
+#ifdef __WXWINCE__
+ ExitThread(3);
+#else
+ abort();
+#endif
+}
+
#if wxDEBUG_LEVEL
// break into the debugger
#if wxDEBUG_LEVEL
// break into the debugger
{
wxSafeShowMessage(wxS("Fatal Error"), msg);
{
wxSafeShowMessage(wxS("Fatal Error"), msg);
-#ifdef __WXWINCE__
- ExitThread(3);
-#else
- abort();
-#endif