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 -8
View File
@@ -442,7 +442,7 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
}
break;
default:
ASSERT(0); // invalid Effect
FAIL_M(ssprintf("Invalid effect: %i", m_Effect));
}
}
@@ -856,13 +856,10 @@ void Actor::SetEffectClockString( const RString &s )
else
{
CabinetLight cl = StringToCabinetLight( s );
if( cl != CabinetLight_Invalid )
{
this->SetEffectClock( (EffectClock) (cl + CLOCK_LIGHT_1) );
return;
}
else
ASSERT(0);
if( cl == CabinetLight_Invalid )
FAIL_M(ssprintf("Invalid cabinet light: %s", s.c_str()));
this->SetEffectClock( (EffectClock) (cl + CLOCK_LIGHT_1) );
}
}