Mercurial > repos > IBBoard.WarFoundry.API
diff api/Factories/Xml/WarFoundryXmlArmyParser.cs @ 155:df61d26c23fb
Re #178: "crash" when loading old .army file with equipment tags that are "old"
* Try to tidy up the exception messages - ideally they'll end up translated and localised
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 28 Sep 2009 19:48:37 +0000 |
parents | 52e8c3cdde10 |
children | d1068f4b6d1c |
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlArmyParser.cs Mon Sep 28 19:32:52 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlArmyParser.cs Mon Sep 28 19:48:37 2009 +0000 @@ -42,7 +42,7 @@ if (system == null) { - throw new RequiredDataMissingException(file.Name, "gameSystem", systemID); + throw new RequiredDataMissingException(file.Name, "Game System", systemID); } string raceID = elem.GetAttribute("race"); @@ -50,7 +50,7 @@ if (race == null) { - throw new RequiredDataMissingException(file.Name, "race", raceID); + throw new RequiredDataMissingException(file.Name, "Race", raceID); } int points = XmlTools.GetIntValueFromAttribute(elem, "maxPoints"); @@ -73,7 +73,7 @@ if (unitType == null) { - throw new RequiredDataMissingException(file.Name, "unitType", unitTypeId); + throw new RequiredDataMissingException(file.Name, "Unit Type", unitTypeId); } string name = unitElem.GetAttribute("unitName"); @@ -101,7 +101,7 @@ if (item == null) { - throw new RequiredDataMissingException(file.Name, "equipItem ID", equipID); + throw new RequiredDataMissingException(file.Name, "Equipment Item", equipID); } double amount = XmlTools.GetDoubleValueFromAttribute(elem, "amount");