comparison api/Factories/Xml/WarFoundryXmlRaceFactory.cs @ 232:f5009a00a50d

Re #236: Handle null game system in race * Fix error message text no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Thu, 24 Dec 2009 14:57:32 +0000
parents d1c90159547a
children 91ee6259677f
comparison
equal deleted inserted replaced
231:d1c90159547a 232:f5009a00a50d
47 string name = elem.GetAttribute("name"); 47 string name = elem.GetAttribute("name");
48 GameSystem gameSystem = WarFoundryLoader.GetDefault ().GetGameSystem (systemID); 48 GameSystem gameSystem = WarFoundryLoader.GetDefault ().GetGameSystem (systemID);
49 49
50 if (gameSystem == null) 50 if (gameSystem == null)
51 { 51 {
52 throw new InvalidFileException("Referenced game system, "+systemID+" did not exist"); 52 throw new InvalidFileException("Referenced game system, '"+systemID+"', did not exist");
53 } 53 }
54 54
55 Race race = new Race(id, subid, name, gameSystem, mainFactory); 55 Race race = new Race(id, subid, name, gameSystem, mainFactory);
56 StoreExtraData(race, elem); 56 StoreExtraData(race, elem);
57 return race; 57 return race;