replace ASSERT(0) with useful fail messages

This commit is contained in:
Devin J. Pohly
2012-12-27 16:59:35 -05:00
parent 376056a0cf
commit bd0e2074ad
71 changed files with 289 additions and 245 deletions
+5 -3
View File
@@ -218,7 +218,7 @@ void RageTextureManager::DeleteTexture( RageTexture *t )
}
}
ASSERT(0); // we tried to delete a texture that wasn't loaded.
FAIL_M("Tried to delete a texture that wasn't loaded");
}
void RageTextureManager::GarbageCollect( GCType type )
@@ -241,7 +241,8 @@ void RageTextureManager::GarbageCollect( GCType type )
bool bDeleteThis = false;
if( type==screen_changed )
{
switch( t->GetPolicy() )
RageTextureID::TexPolicy policy = t->GetPolicy();
switch( policy )
{
case RageTextureID::TEX_DEFAULT:
/* If m_bDelayedDelete, wait until delayed_delete. If !m_bDelayedDelete,
@@ -253,7 +254,8 @@ void RageTextureManager::GarbageCollect( GCType type )
case RageTextureID::TEX_VOLATILE:
bDeleteThis = true;
break;
default: ASSERT(0);
default:
FAIL_M(ssprintf("Invalid texture policy: %i", policy));
}
}