private void TransformLoop(XmlNodeContext parentContext) { foreach (XmlNode node in parentContext.Node.ChildNodes) { if (!(node is XmlElement element)) { continue; } XmlElementContext context = CreateElementContext(parentContext as XmlElementContext, element); try { HandleElement(context); } catch (Exception ex) { HandleException(ex, context); } } }
private static Exception WrapException(Exception ex, XmlNodeContext context) { return(XmlNodeException.Wrap(ex, context.Node)); }
private void HandleException(Exception ex, XmlNodeContext context) { HandleException(WrapException(ex, context)); }