X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/83dee24ca2b182a77740d33abf72b833e647bcd5..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/msw/crashrpt.h diff --git a/include/wx/msw/crashrpt.h b/include/wx/msw/crashrpt.h index 8f602e9b2d..f354b482c2 100644 --- a/include/wx/msw/crashrpt.h +++ b/include/wx/msw/crashrpt.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 13.07.2003 -// RCS-ID: $Id$ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -24,7 +23,7 @@ struct _EXCEPTION_POINTERS; enum { - // we always report where the crash occured + // we always report where the crash occurred wxCRASH_REPORT_LOCATION = 0, // if this flag is given, the call stack is dumped @@ -48,7 +47,10 @@ enum // // this creates a much larger mini dump than just wxCRASH_REPORT_STACK but // still much smaller than wxCRASH_REPORT_LOCALS one - wxCRASH_REPORT_GLOBALS = 4 + wxCRASH_REPORT_GLOBALS = 4, + + // default is to create the smallest possible crash report + wxCRASH_REPORT_DEFAULT = wxCRASH_REPORT_LOCATION | wxCRASH_REPORT_STACK }; // ---------------------------------------------------------------------------- @@ -91,20 +93,24 @@ struct WXDLLIMPEXP_BASE wxCrashReport { // set the name of the file to which the report is written, it is // constructed from the .exe name by default - static void SetFileName(const wxChar *filename); + static void SetFileName(const wxString& filename); // return the current file name - static const wxChar *GetFileName(); + static wxString GetFileName(); // write the exception report to the file, return true if it could be done // or false otherwise // // if ep pointer is NULL, the global exception info which is valid only // inside wxApp::OnFatalException() is used - static bool Generate(int flags = wxCRASH_REPORT_LOCATION | - wxCRASH_REPORT_STACK, + static bool Generate(int flags = wxCRASH_REPORT_DEFAULT, _EXCEPTION_POINTERS *ep = NULL); + + // generate a crash report from outside of wxApp::OnFatalException(), this + // can be used to take "snapshots" of the program in wxApp::OnAssert() for + // example + static bool GenerateNow(int flags = wxCRASH_REPORT_DEFAULT); }; #endif // wxUSE_CRASHREPORT