Add a system option to exit immediately on assert failure.
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
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include "wx/filename.h"
|
||||
#include "wx/msgout.h"
|
||||
#include "wx/scopedptr.h"
|
||||
#include "wx/sysopt.h"
|
||||
#include "wx/tokenzr.h"
|
||||
#include "wx/thread.h"
|
||||
|
||||
@@ -1027,6 +1028,10 @@ wxDefaultAssertHandler(const wxString& file,
|
||||
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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user