Пример #1
0
 private void ProcessException(Exception ex, string methodName, ref XmlWriter xmlWriter, ref StringWriter stringWriter)
 {
     m_connectorInc.Init_ResponseXML(methodName, ref stringWriter, ref xmlWriter);
     if (ex is CMSException)
     {
         CMSException.StatusCodes statusCode = CMSException.StatusCodes.GENERAL_ERROR;
         if (ex.Data != null)
         {
             statusCode = (CMSException.StatusCodes)ex.Data["StatusCode"];
         }
         m_connectorInc.Generate_Status_XML(ref xmlWriter, methodName, statusCode, ex.Message, false);
     }
     else
     {
         m_common.Error_Processor(ex.ToString());
         m_connectorInc.Generate_Status_XML(ref xmlWriter, methodName, CMS.CMSException.StatusCodes.APPLICATION_EXCEPTION, m_phraseLib.Lookup("term.errorprocessingseelog"), false);
         m_common.Write_Log("An error occurred while processing - please see the error log!");
     }
 }
Пример #2
0
 private void GenerateStatusXml(XmlWriter xmlWriter, string methodName, CMSException.StatusCodes exception, string description)
 {
     xmlWriter.WriteStartElement(methodName);
     m_connectorInc.Generate_Status_XML(ref xmlWriter, methodName, exception, description, false);
 }