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