ReadItem should be ReadInstance in exceptions

This commit is contained in:
Max G 2019-02-04 21:39:47 -06:00 committed by GitHub
parent 2be61916de
commit 47bdbeb25d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,11 +43,11 @@ namespace RobloxFiles.XmlFormat
{ {
// Process the instance itself // Process the instance itself
if (instNode.Name != "Item") if (instNode.Name != "Item")
throw new Exception("XmlDataReader.ReadItem: Provided XmlNode's class should be 'Item'!"); throw new Exception("XmlDataReader.ReadInstance: Provided XmlNode's name should be 'Item'!");
XmlNode classToken = instNode.Attributes.GetNamedItem("class"); XmlNode classToken = instNode.Attributes.GetNamedItem("class");
if (classToken == null) if (classToken == null)
throw new Exception("XmlDataReader.ReadItem: Got an Item without a defined 'class' attribute!"); throw new Exception("XmlDataReader.ReadInstance: Got an Item without a defined 'class' attribute!");
Instance inst = new Instance(classToken.InnerText); Instance inst = new Instance(classToken.InnerText);
@ -59,7 +59,7 @@ namespace RobloxFiles.XmlFormat
string refId = refToken.InnerText; string refId = refToken.InnerText;
if (file.Instances.ContainsKey(refId)) if (file.Instances.ContainsKey(refId))
throw new Exception("XmlDataReader.ReadItem: Got an Item with a duplicate 'referent' attribute!"); throw new Exception("XmlDataReader.ReadInstance: Got an Item with a duplicate 'referent' attribute!");
file.Instances.Add(refId, inst); file.Instances.Add(refId, inst);
} }