Well, we should have some sensible exception handling in VCMI

This commit is contained in:
Tomasz Zieliński
2022-09-11 11:31:28 +03:00
committed by Andrii Danylchenko
parent 1649cf2bb9
commit 22b4795f86
+3 -1
View File
@@ -1412,7 +1412,9 @@ void CGHeroInstance::setHeroTypeName(const std::string & identifier)
if(rawId)
subID = rawId.get();
else
subID = 0; //fallback to Orrin, throw error instead?
{
throw std::runtime_error("Couldn't resolve hero identifier " + identifier);
}
}
}