XMLParsingException.cpp
上传用户:kj0090
上传日期:2007-03-02
资源大小:39k
文件大小:3k
源码类别:
xml/soap/webservice
开发平台:
C/C++
- /***********************************************************************
- *
- * This module is part of the XMLGUI system
- *
- * File name: XMLParsingException.cpp
- *
- * Creation date: [15 AUGUST 2002]
- *
- * Author(s): [Kolosenko Ruslan]
- *
- * Description: Implements the class CXMLParsingException
- *
- **********************************************************************/
- #include "stdafx.h"
- #include "XMLParsingException.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char THIS_FILE[]=__FILE__;
- #define new DEBUG_NEW
- #endif
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- /**************************************************************************
- * Function : CXMLParsingException::CXMLParsingException
- * Description : Constructs empty CXMLParsingException object
- ***************************************************************************/
- CXMLParsingException::CXMLParsingException():m_Error(S_OK)
- {
- m_szDescription = "";
- }
- /**************************************************************************
- * Function : CXMLParsingException::CXMLParsingException
- * Description : Constructs CXMLParsingException object from COM operation
- * : result value
- * Arguments : hr - descriptor of COM operation result
- ***************************************************************************/
- CXMLParsingException::CXMLParsingException(HRESULT hr):m_Error(hr)
- {
- m_szDescription = "";
- }
- /**************************************************************************
- * Function : CXMLParsingException::CXMLParsingException
- * Description : Constructs CXMLParsingException object from string representation
- * : of exception cause
- * Arguments : szCause - pointer to a string containing textual description
- * : of the exception cause
- ***************************************************************************/
- CXMLParsingException::CXMLParsingException(LPCTSTR szCause):m_Error(S_OK)
- {
- m_szDescription = szCause;
- }
- /**************************************************************************
- * Function : CXMLParsingException::~CXMLParsingException
- * Description : Destructor
- ***************************************************************************/
- CXMLParsingException::~CXMLParsingException()
- {
- }
- /**************************************************************************
- * Function : CXMLParsingException::GetDescription
- * Description : Returns textual description of the exception cause
- * Return value : pointer to a string with description of the exception cause
- ***************************************************************************/
- LPCTSTR CXMLParsingException::GetDescription() const
- {
- if ( !m_szDescription.IsEmpty() )
- {
- // if textual description of the exception cause is present -
- // return it
- return m_szDescription;
- }
- else
- {
- // otherwise obtain description from the COM error holder
- return m_Error.ErrorMessage();
- }
- }