XmlPokeStep, NullReferenceException if node not found

Jul 7, 2009 at 11:01 AM

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 it
context.LogInfo("Old value is " + xDoc.SelectSingleNode(xPathExpr).InnerXml);                                             

...

Coordinator
Jul 7, 2009 at 11:19 AM

Thanks  for pointing this out. Will fix it as soon as possible.

benjy

Coordinator
Jul 7, 2009 at 11:19 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.