Implemented better exceptions
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-10-31 13:26:56 +01:00
parent ffba5fb24c
commit 65f814b006
9 changed files with 55 additions and 11 deletions

View File

@@ -34,8 +34,7 @@ int8_t CreatureLib::Library::SpeciesVariant::GetTalentIndex(std::string talent)
if (i != _secretTalents.end()){
return std::distance(_secretTalents.begin(), i);
}
//TODO: implement better exception.
throw;
throw CreatureException("The given talent is not a valid talent for this creature.");
}
int8_t CreatureLib::Library::SpeciesVariant::GetRandomTalent(CreatureLib::Core::Random *rand) const {