private void CompareException(XmlException e, string ec, Exception inner, int ln, int lp) { CError.WriteLine(e); CError.Compare((object)e.InnerException, (object)inner, "InnerException"); CError.Compare(e.LineNumber, ln, "LineNumber"); CError.Compare(e.LinePosition, lp, "LinePosition"); string s1 = e.StackTrace; Type t = e.GetType(); Exception e2 = e.GetBaseException(); int i = e.GetHashCode(); CError.Compare(!String.IsNullOrEmpty(e.Message), "Message"); string s3 = e.ToString(); }
protected void CheckXmlException(string expectedCode, XmlException e, int expectedLine, int expectedPosition) { string actualCode = expectedCode; CError.WriteLine("***Exception"); CError.WriteLineIgnore(e.ToString()); CError.Compare(e.LineNumber, expectedLine, "CheckXmlException:LineNumber"); CError.Compare(e.LinePosition, expectedPosition, "CheckXmlException:LinePosition"); CError.Compare(actualCode, expectedCode, "ec" + e.Message); }
private static void ReportExceptionForETW(XmlException exception) { PSEtwLog.LogAnalyticError(PSEventId.Serializer_XmlExceptionWhenDeserializing, PSOpcode.Exception, PSTask.Serialization, PSKeyword.Serializer | PSKeyword.UseAlwaysAnalytic, new object[] { exception.LineNumber, exception.LinePosition, exception.ToString() }); }