XMLParsingException.h
上传用户:kj0090
上传日期:2007-03-02
资源大小:39k
文件大小:1k
源码类别:

xml/soap/webservice

开发平台:

C/C++

  1. /***********************************************************************
  2. *
  3. * This module is part of the XMLGUI system 
  4. *
  5. * File name:       XMLParsingException.h
  6. *
  7. * Creation date:   [15 AUGUST 2002] 
  8. *
  9. * Author(s):       [Kolosenko Ruslan]
  10. *
  11. * Description:     Declares the class CXMLParsingException
  12. *
  13. **********************************************************************/
  14. #ifndef AFX_XML_PARSING_EXCEPTION_H_RKOL_8_15_2002_
  15. #define AFX_XML_PARSING_EXCEPTION_H_RKOL_8_15_2002_
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif // _MSC_VER > 1000
  19.    // useful macro in XML parsing
  20. #define WATCH_XML_EXCEPTION(hr) if ( FAILED(hr) ) throw CXMLParsingException(hr);
  21. #include "XMLGUIMacro.h"
  22. class XMLGUI_EXT_CLASS CXMLParsingException  
  23. {
  24. public:
  25. CXMLParsingException();               // default constructor
  26.     CXMLParsingException(HRESULT hr);     // constructor using COM error descriptor
  27.     CXMLParsingException(LPCTSTR szCause); // constructor using text description of error
  28. virtual ~CXMLParsingException();
  29.     LPCTSTR GetDescription() const;        // returns textual description of the error
  30. protected:
  31.     _com_error   m_Error;                 // COM error holder
  32.     CString      m_szDescription;         // text of the exception cause description
  33. };
  34. #endif // AFX_XML_PARSING_EXCEPTION_H_RKOL_8_15_2002_