Пример #1
0
        internal void AddThreadAndExitInfo(CIContainer aContainer)
        {
            CIElementList <CIThread> threads = aContainer.ChildrenByType <CIThread>(CIElement.TChildSearchType.EEntireHierarchy);

            if (threads.Count > 1)
            {
                System.Console.WriteLine("Warning: XmlFilePlugin found multiple threads. XML file output can handle only one thread!");
            }
            foreach (CIThread thread in threads)
            {
                iPanicCategory     = thread.ExitInfo.Category;
                iPanicID           = thread.ExitInfo.Reason;
                iPanicDescription  = XmlErrorLibrary.GetPanicDescription(iPanicCategory, iPanicID.ToString());
                iCrashedModuleName = thread.FullName;
            }
        }
Пример #2
0
        protected override void XmlSerializeContent(CrashXmlPlugin.FileFormat.Document.CXmlDocumentSerializationParameters aParameters)
        {
            // Type
            aParameters.Writer.WriteStartElement(SegConstants.ExitInfo_Type);
            switch (iExitInfo.Type)
            {
            case CIExitInfo.TExitType.EExitTypeException:
                aParameters.Writer.WriteString(SegConstants.ExitInfo_Type_Exception);
                break;

            case CIExitInfo.TExitType.EExitTypeKill:
                aParameters.Writer.WriteString(SegConstants.ExitInfo_Type_Kill);
                break;

            case CIExitInfo.TExitType.EExitTypePanic:
                aParameters.Writer.WriteString(SegConstants.ExitInfo_Type_Panic);
                break;

            case CIExitInfo.TExitType.EExitTypePending:
                aParameters.Writer.WriteString(SegConstants.ExitInfo_Type_Pending);
                break;

            case CIExitInfo.TExitType.EExitTypeTerminate:
                aParameters.Writer.WriteString(SegConstants.ExitInfo_Type_Terminate);
                break;
            }
            aParameters.Writer.WriteEndElement();

            // For panics or terminates, reason & category
            switch (iExitInfo.Type)
            {
            case CIExitInfo.TExitType.EExitTypeException:
            case CIExitInfo.TExitType.EExitTypeTerminate:
            case CIExitInfo.TExitType.EExitTypePanic:
                aParameters.Writer.WriteElementString(SegConstants.ExitInfo_Category, iExitInfo.Category);
                aParameters.Writer.WriteElementString(SegConstants.ExitInfo_Reason, iExitInfo.Reason.ToString());

                // Get panic description
                String description = XmlErrorLibrary.GetPanicDescription(iExitInfo.Category, iExitInfo.Reason.ToString());
                aParameters.Writer.WriteElementString(SegConstants.ExitInfo_Description, description);
                break;
            }
        }
        internal void WritePanicDescription(System.IO.StreamWriter aOutput)
        {
            string panicDescription = XmlErrorLibrary.GetPanicDescription(iPanicCategory, iPanicID.ToString());

            CCrashInfoFileUtilities.WriteOutputTags(panicDescription, CrashInfoConsts.Kpanic_description, aOutput);
        }