public static Wrap ( |
||
ex | ||
node | ||
return |
private Exception WrapException(Exception ex, XmlNodeContext context) { return(XmlNodeException.Wrap(ex, context.Node)); }
private Exception WrapException(Exception ex, XmlNode node) { return(XmlNodeException.Wrap(ex, node)); }
internal void Execute(XmlElementContext context, string argumentString) { if (this.context != null || this.argumentString != null) { return; } bool flag1 = false; bool flag2 = false; try { this.context = context; this.argumentString = argumentString; this.arguments = (IList <string>)null; if (!this.ShouldExecuteTransform()) { return; } flag2 = true; this.Log.StartSection(MessageType.Verbose, "Executing {0}", new object[1] { (object)this.TransformNameLong }); this.Log.LogMessage(MessageType.Verbose, "on {0}", new object[1] { (object)context.XPath }); if (this.ApplyTransformToAllTargetNodes) { this.ApplyOnAllTargetNodes(); } else { this.ApplyOnce(); } } catch (Exception ex) { flag1 = true; if (context.TransformAttribute != null) { this.Log.LogErrorFromException(XmlNodeException.Wrap(ex, (XmlNode)context.TransformAttribute)); } else { this.Log.LogErrorFromException(ex); } } finally { if (flag2) { if (flag1) { this.Log.EndSection(MessageType.Verbose, "Error during {0}", new object[1] { (object)this.TransformNameShort }); } else { this.Log.EndSection(MessageType.Verbose, "Done executing {0}", new object[1] { (object)this.TransformNameShort }); } } else { this.Log.LogMessage(MessageType.Normal, "Not executing {0}", new object[1] { (object)this.TransformNameLong }); } this.context = (XmlElementContext)null; this.argumentString = (string)null; this.arguments = (IList <string>)null; this.ReleaseLogger(); } }
private Exception WrapException(Exception ex) { return(XmlNodeException.Wrap(ex, (XmlNode)this.Element)); }