1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Rework handling some errors and uncought exceptions

This commit is contained in:
Michał Zaremba
2025-09-09 15:28:59 +02:00
parent 076f7ba5b5
commit ea261ae48f
20 changed files with 117 additions and 83 deletions

View File

@@ -408,9 +408,9 @@ TObjectTypeHandler CObjectClassesHandler::getHandlerFor(const std::string & scop
return object->objectTypeHandlers.at(subID.value());
}
std::string errorString = "Failed to find object of type " + type + "::" + subtype;
logGlobal->error(errorString);
throw std::runtime_error(errorString);
std::string objectType = type + "::" + subtype;
logGlobal->error("Failed to find object of type %s", objectType);
throw IdentifierResolutionException(objectType);
}
TObjectTypeHandler CObjectClassesHandler::getHandlerFor(CompoundMapObjectID compoundIdentifier) const