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
+4 -7
View File
@@ -418,8 +418,7 @@ RString UnlockEntry::GetDescription() const
switch( m_Type )
{
default:
ASSERT(0);
return "";
FAIL_M(ssprintf("Invalid UnlockRewardType: %i", m_Type));
case UnlockRewardType_Song:
return pSong ? pSong->GetDisplayFullTitle() : "";
case UnlockRewardType_Steps:
@@ -446,8 +445,7 @@ RString UnlockEntry::GetBannerFile() const
switch( m_Type )
{
default:
ASSERT(0);
return "";
FAIL_M(ssprintf("Invalid UnlockRewardType: %i", m_Type));
case UnlockRewardType_Song:
case UnlockRewardType_Steps:
case UnlockRewardType_Steps_Type:
@@ -465,8 +463,7 @@ RString UnlockEntry::GetBackgroundFile() const
switch( m_Type )
{
default:
ASSERT(0);
return "";
FAIL_M(ssprintf("Invalid UnlockRewardType: %i", m_Type));
case UnlockRewardType_Song:
case UnlockRewardType_Steps:
case UnlockRewardType_Steps_Type:
@@ -631,7 +628,7 @@ void UnlockManager::Load()
// nothing to cache
break;
default:
ASSERT(0);
FAIL_M(ssprintf("Invalid UnlockRewardType: %i", e->m_Type));
}
}