From 366160fee702c2cf94cc09eac35a050da55d448b Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 20 Jul 2012 15:31:56 +0000 Subject: [PATCH] - updated error message to be more clear and specify which techtree is involved --- source/glest_game/types/tech_tree.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/glest_game/types/tech_tree.cpp b/source/glest_game/types/tech_tree.cpp index baa42001..3052c401 100644 --- a/source/glest_game/types/tech_tree.cpp +++ b/source/glest_game/types/tech_tree.cpp @@ -342,7 +342,10 @@ const ResourceType *TechTree::getFirstTechResourceType() const{ return getResourceType(i); } - throw megaglest_runtime_error("This tech tree has no resources defined, at least one is required"); + char szBuf[8096]=""; + sprintf(szBuf,"The referenced tech tree [%s] is either missing or has no resources defined but at least one resource is required.",this->name.c_str()); + //throw megaglest_runtime_error("This tech tree has no resources defined, at least one is required"); + throw megaglest_runtime_error(szBuf); } const ResourceType *TechTree::getResourceType(const string &name) const{