Avoid outputting the assert message twice in non-GUI code.

As we always log the assert message in ::ShowAssertDialog() itself there is no
need to log it again in wxAppTraitsBase::ShowAssertDialog().

Also show the "please wait while generating stack trace information" in
wxAppTraitsBase::GetAssertStackTrace() itself instead of doing it in both
places which call it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-12-09 14:59:26 +00:00
parent 61c18e1a3d
commit 021efd6510
2 changed files with 17 additions and 18 deletions

View File

@@ -465,11 +465,6 @@ bool wxGUIAppTraitsBase::ShowAssertDialog(const wxString& msg)
wxString msgDlg = msg;
#if wxUSE_STACKWALKER
// on Unix stack frame generation may take some time, depending on the
// size of the executable mainly... warn the user that we are working
wxFprintf(stderr, wxT("[Debug] Generating a stack trace... please wait"));
fflush(stderr);
const wxString stackTrace = GetAssertStackTrace();
if ( !stackTrace.empty() )
msgDlg << wxT("\n\nCall stack:\n") << stackTrace;