wxASSERT(false) --> wxFAIL

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2006-05-03 04:12:48 +00:00
parent c2f5b920ca
commit 4362c7052b
6 changed files with 9 additions and 9 deletions

View File

@@ -284,7 +284,7 @@ wxString wxFileConfig::GetGlobalDir()
strDir.Printf(wxT("%c:\\OS2\\"), 'A'+drive-1); strDir.Printf(wxT("%c:\\OS2\\"), 'A'+drive-1);
} }
#elif defined(__WXSTUBS__) #elif defined(__WXSTUBS__)
wxASSERT_MSG( false, wxT("TODO") ) ; wxFAIL_MSG( wxT("TODO") );
#elif defined(__DOS__) #elif defined(__DOS__)
// There's no such thing as global cfg dir in MS-DOS, let's return // There's no such thing as global cfg dir in MS-DOS, let's return
// current directory (FIXME_MGL?) // current directory (FIXME_MGL?)

View File

@@ -676,7 +676,7 @@ wxTopLevelWindowGTK::~wxTopLevelWindowGTK()
{ {
if (m_grabbed) if (m_grabbed)
{ {
wxASSERT_MSG( false, _T("Window still grabbed")); wxFAIL_MSG(_T("Window still grabbed"));
RemoveGrab(); RemoveGrab();
} }

View File

@@ -630,7 +630,7 @@ void wxMimeTypesManagerImpl::Initialize(int mailcapStyles, const wxString& extra
if (status != noErr) if (status != noErr)
{ {
wxLogDebug(wxT("Could not initialize wxMimeTypesManager!")); wxLogDebug(wxT("Could not initialize wxMimeTypesManager!"));
wxASSERT( false ); wxFAIL;
m_hIC = NULL; m_hIC = NULL;
return; return;

View File

@@ -907,7 +907,7 @@ bool wxToolBar::Realize()
if (err != noErr) if (err != noErr)
{ {
wxString errMsg = wxString::Format( wxT("HIToolbarRemoveItemAtIndex failed [%ld]"), (long)err ); wxString errMsg = wxString::Format( wxT("HIToolbarRemoveItemAtIndex failed [%ld]"), (long)err );
wxASSERT_MSG( 0, errMsg.c_str() ); wxFAIL_MSG( errMsg.c_str() );
} }
} }
@@ -915,7 +915,7 @@ bool wxToolBar::Realize()
if (err != noErr) if (err != noErr)
{ {
wxString errMsg = wxString::Format( wxT("HIToolbarInsertItemAtIndex failed [%ld]"), (long)err ); wxString errMsg = wxString::Format( wxT("HIToolbarInsertItemAtIndex failed [%ld]"), (long)err );
wxASSERT_MSG( 0, errMsg.c_str() ); wxFAIL_MSG( errMsg.c_str() );
} }
tool->SetIndex( currentPosition ); tool->SetIndex( currentPosition );
@@ -1265,7 +1265,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
else else
{ {
wxString errMsg = wxString::Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long)err ); wxString errMsg = wxString::Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long)err );
wxASSERT_MSG( false, errMsg.c_str() ); wxFAIL_MSG( errMsg.c_str() );
} }
return (err == noErr); return (err == noErr);

View File

@@ -1434,7 +1434,7 @@ bool wxMimeTypesManagerImpl::WriteToMimeTypes(int index, bool delete_index)
nIndex = file.pIndexOf(wxT("#--Netscape")); nIndex = file.pIndexOf(wxT("#--Netscape"));
if (nIndex != wxNOT_FOUND) if (nIndex != wxNOT_FOUND)
{ {
wxASSERT_MSG(false,wxT("Error in .mime.types \nTrying to mix Netscape and Metamail formats\nFile not modiifed")); wxFAIL_MSG(wxT("Error in .mime.types\nTrying to mix Netscape and Metamail formats\nFile not modified"));
return false; return false;
} }
@@ -1501,7 +1501,7 @@ bool wxMimeTypesManagerImpl::WriteToNSMimeTypes(int index, bool delete_index)
// metamail entreies // metamail entreies
if (file.GetLineCount() > 0) if (file.GetLineCount() > 0)
{ {
wxASSERT_MSG(false, wxT(".mime.types File not in Netscape format\nNo entries written to\n.mime.types or to .mailcap")); wxFAIL_MSG(wxT(".mime.types File not in Netscape format\nNo entries written to\n.mime.types or to .mailcap"));
return false; return false;
} }

View File

@@ -484,7 +484,7 @@ void wxWindowX11::DoCaptureMouse()
{ {
if ((g_captureWindow != NULL) && (g_captureWindow != this)) if ((g_captureWindow != NULL) && (g_captureWindow != this))
{ {
wxASSERT_MSG(false, wxT("Trying to capture before mouse released.")); wxFAIL_MSG(wxT("Trying to capture before mouse released."));
// Core dump now // Core dump now
int *tmp = NULL; int *tmp = NULL;