added (and documented) wxSafeShowMessage, use it in wxLogFatalError instead of wxMessageBox

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-05-09 15:59:42 +00:00
parent 9cb47ea276
commit c11d62a6e2
3 changed files with 44 additions and 7 deletions

View File

@@ -476,11 +476,13 @@ private:
// return the last system error code
WXDLLEXPORT unsigned long wxSysErrorCode();
// return the error message for given (or last if 0) error code
WXDLLEXPORT const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0);
// ----------------------------------------------------------------------------
// define wxLog<level>
// -------------------
// ----------------------------------------------------------------------------
#define DECLARE_LOG_FUNCTION(level) \
extern void WXDLLEXPORT wxVLog##level(const wxChar *szFormat, \
@@ -559,6 +561,10 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode);
inline void wxLogTrace(const wxChar *, const wxChar *, ...) { }
#endif // debug/!debug
// wxLogFatalError helper: show the (fatal) error to the user in a safe way,
// i.e. without using wxMessageBox() for example because it could crash
extern void wxSafeShowMessage(const wxString& title, const wxString& text);
// ----------------------------------------------------------------------------
// debug only logging functions: use them with API name and error code
// ----------------------------------------------------------------------------
@@ -588,4 +594,3 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode);
#endif // _WX_LOG_H_
// vi:sts=4:sw=4:et