This option will allow to test for absence of asserts in wxWidgets samples in
the future.
Closes #10697.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64652
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
These options are currently recognised by wxWidgets:
+ @section sysopt_all All platforms
+
+ @beginFlagTable
+ @flag{exit-on-assert}
+ If set to non-zero value, abort the program if an assertion fails. The
+ default behaviour in case of assertion failure depends on the build mode
+ and can be changed by overriding wxApp::OnAssertFailure() but setting
+ this option allows to change it without modifying the program code and
+ also applies to asserts which may happen before the wxApp object
+ creation or after its destruction.
+ @endFlagTable
@section sysopt_win Windows
#include "wx/filename.h"
#include "wx/msgout.h"
#include "wx/scopedptr.h"
+#include "wx/sysopt.h"
#include "wx/tokenzr.h"
#include "wx/thread.h"
const wxString& cond,
const wxString& msg)
{
+ // If this option is set, we should abort immediately when assert happens.
+ if ( wxSystemOptions::GetOptionInt("exit-on-assert") )
+ abort();
+
// FIXME MT-unsafe
static int s_bInAssert = 0;