- #elif defined(__WXMAC__)
- #if __powerc
- Debugger();
- #else
- SysBreak();
- #endif
- #else // Unix
- raise(SIGTRAP);
- #endif // Win/Unix
-}
-
-// this function is called when an assert fails
-void wxOnAssert(const char *szFile, int nLine, const char *szMsg)
-{
- // this variable can be set to true to suppress "assert failure" messages
- static bool s_bNoAsserts = FALSE;
- static bool s_bInAssert = FALSE;
-
- if ( s_bInAssert ) {
- // He-e-e-e-elp!! we're trapped in endless loop
- Trap();
-
- return;
- }
-
- s_bInAssert = TRUE;
-
- char szBuf[LOG_BUFFER_SIZE];
-
- // make life easier for people using VC++ IDE: clicking on the message will
- // take us immediately to the place of the failed assert
-#ifdef _MSC_VER
- sprintf(szBuf, _("%s(%d): assert failed"), szFile, nLine);
-#else // !VC++
- // make the error message more clear for all the others
- sprintf(szBuf, _("Assert failed in file %s at line %d"), szFile, nLine);
-#endif // VC/!VC
-
- if ( szMsg != NULL ) {
- strcat(szBuf, ": ");
- strcat(szBuf, szMsg);
- }
- else {
- strcat(szBuf, ".");
- }
-
- if ( !s_bNoAsserts ) {
- // send it to the normal log destination
- wxLogDebug(szBuf);
-
- #if wxUSE_NOGUI
- Trap();
- #else
- strcat(szBuf, _("\nDo you want to stop the program?"
- "\nYou can also choose [Cancel] to suppress "
- "further warnings."));
-
- switch ( wxMessageBox(szBuf, _("Debug"),
- wxYES_NO | wxCANCEL | wxICON_STOP ) ) {
- case wxYES:
- Trap();
- break;
-
- case wxCANCEL:
- s_bNoAsserts = TRUE;
- break;
-
- //case wxNO: nothing to do
- }
- #endif // USE_NOGUI
- }
-
- s_bInAssert = FALSE;
+ return NULL;
+#endif // Win16/32
+#else // Unix
+#if wxUSE_UNICODE
+ static wxChar s_szBuf[LOG_BUFFER_SIZE / 2];
+ wxConvCurrent->MB2WC(s_szBuf, strerror(nErrCode), WXSIZEOF(s_szBuf) -1);
+ return s_szBuf;
+#else
+ return strerror((int)nErrCode);
+#endif
+#endif // Win/Unix