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:
committed by
Andrii Danylchenko
parent
1649cf2bb9
commit
22b4795f86
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user