Mercurial > repos > IBBoard.WarFoundry.API
diff api/Factories/Xml/WarFoundryXmlFactoryUtils.cs @ 217:89e26d51afc2
Fixes #226: "NullReferenceException" for a unitID
* Add null check and throw InvalidFileException when getting unit XML by ID
* Change InvalidDataException (which is a core exception about data streams) to InvalidFileException (which is our exception for incorrect data in a file)
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 28 Nov 2009 16:06:06 +0000 |
parents | c1caf467dd40 |
children | a1a6b527cd70 |
line wrap: on
line diff
--- a/api/Factories/Xml/WarFoundryXmlFactoryUtils.cs Sun Nov 22 20:14:51 2009 +0000 +++ b/api/Factories/Xml/WarFoundryXmlFactoryUtils.cs Sat Nov 28 16:06:06 2009 +0000 @@ -80,7 +80,7 @@ private static void ValidationEventMethod(object sender, ValidationEventArgs e) { - throw new InvalidDataException("Problem validating against schema for WarFoundry data: " + e.Message, e.Exception); + throw new InvalidFileException("Problem validating against schema for WarFoundry data: " + e.Message, e.Exception); } private static void AddSchemaToCache(XmlSchemaSet cache, string xmlNamespace, string schemaLocation)