1
Vote

XmlPokeStep, NullReferenceException if node not found

description

NullReferenceException is thrown, if node is not found with xpath expression provided as argument. Call to xDoc.SelectSingleNode(xPathExpr) returns null if no node is found. Maybe some kind of exception should be thrown (?), but NullReferenceException is kinda nasty.
 
In PokeXmlDocument method:
 
...
 
//check what the old value was and log itcontext.LogInfo("Old value is " + xDoc.SelectSingleNode(xPathExpr).InnerXml);
 
...

comments