Changed all the wxASSERT(0) calls to use wxFAIL_MSG()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
George Tasker
2001-12-03 10:54:59 +00:00
parent 5515f252cb
commit 3a87625f68
2 changed files with 8 additions and 7 deletions

View File

@@ -35,11 +35,12 @@
size_t spInterFileContext::GetFileNo( const string& fname ) size_t spInterFileContext::GetFileNo( const string& fname )
{ {
for( size_t i = 0; i != mFiles.size(); ++i ) size_t i;
for ( i = 0; i != mFiles.size(); ++i )
if ( fname == mFiles[i] )
return i;
if ( fname == mFiles[i] ) return i; wxFAIL_MSG("File not found in array in function spInterFileContext::GetFileNo()");
wxASSERT(0); // DBG::
return 0; return 0;
} }
@@ -119,8 +120,8 @@ void spInterFileContext::DoAppendSourceFragment( string& source,
if ( cur >= pos + len ) // check if we've overstepped the current source-fragment if ( cur >= pos + len ) // check if we've overstepped the current source-fragment
{ {
wxASSERT(0); // DBG:: with current imp. this should not happen // wxASSERT(0); // DBG:: with current imp. this should not happen
wxFAIL_MSG("Overstepped the current source fragment in function\nspInterFileContext::DoAppendSourceFragment()");
cur = pos + len; break; cur = pos + len; break;
} }
} }

View File

@@ -346,7 +346,7 @@ void spContext::RemoveThisContext()
mpParent->RemoveChild( this ); mpParent->RemoveChild( this );
else else
// context should have a parent // context should have a parent
wxASSERT(0); wxFAIL_MSG("Context should have a parent");
} }
spContext* spContext::GetOutterContext() spContext* spContext::GetOutterContext()