1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Well, we should have some sensible exception handling in VCMI

This commit is contained in:
Tomasz Zieliński
2022-09-09 21:02:16 +02:00
committed by Andrii Danylchenko
parent 1649cf2bb9
commit 22b4795f86

View File

@@ -1412,7 +1412,9 @@ void CGHeroInstance::setHeroTypeName(const std::string & identifier)
if(rawId) if(rawId)
subID = rawId.get(); subID = rawId.get();
else else
subID = 0; //fallback to Orrin, throw error instead? {
throw std::runtime_error("Couldn't resolve hero identifier " + identifier);
}
} }
} }