当前位置: 首页>>代码示例>>C++>>正文


C++ DOMError::getLocation方法代码示例

本文整理汇总了C++中DOMError::getLocation方法的典型用法代码示例。如果您正苦于以下问题:C++ DOMError::getLocation方法的具体用法?C++ DOMError::getLocation怎么用?C++ DOMError::getLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DOMError的用法示例。


在下文中一共展示了DOMError::getLocation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: uri

  VXIDOMException(const DOMError& domError) {
    XMLChToVXIchar uri(domError.getLocation()->getURI());
    XMLChToVXIchar message(domError.getMessage());

    _uri = uri.c_str();
    _message = message.c_str();
    _line = domError.getLocation()->getLineNumber();
    _col = domError.getLocation()->getColumnNumber();
  }
开发者ID:Eric-De,项目名称:voiceglue,代码行数:9,代码来源:DocumentParser.cpp

示例2: handleError

bool DOMCountErrorHandler::handleError(const DOMError& domError){
  fSawErrors = true;
  if (domError.getSeverity() == DOMError::DOM_SEVERITY_WARNING)
    XERCES_STD_QUALIFIER cerr << "\nWarning at file ";
  else if (domError.getSeverity() == DOMError::DOM_SEVERITY_ERROR)
    XERCES_STD_QUALIFIER cerr << "\nError at file ";
  else
    XERCES_STD_QUALIFIER cerr << "\nFatal Error at file ";
  
  XERCES_STD_QUALIFIER cerr << StrX(domError.getLocation()->getURI())
			    << ", line " << domError.getLocation()->getLineNumber()
			    << ", char " << domError.getLocation()->getColumnNumber()
			    << "\n  Message: " << StrX(domError.getMessage()) << XERCES_STD_QUALIFIER endl;
  
  return true;
}
开发者ID:CRTandKDU,项目名称:NCloseCompiler,代码行数:16,代码来源:CouchRunServer.cpp

示例3: handleError

 bool handleError(const DOMError& domError) {
   sawErrors = true;
   if (domError.getSeverity() == DOMError::DOM_SEVERITY_WARNING)
     cerr << "\nWarning at file ";
   else if (domError.getSeverity() == DOMError::DOM_SEVERITY_ERROR)
     cerr << "\nError at file ";
   else
     cerr << "\nFatal Error at file ";
   
   cerr << StrX(domError.getLocation()->getURI())
        << ", line " << domError.getLocation()->getLineNumber()
        << ", char " << domError.getLocation()->getColumnNumber()
        << "\n  Message: " << StrX(domError.getMessage()) << endl;
   
   return false;
 }
开发者ID:arjunroy,项目名称:modelnet-core,代码行数:16,代码来源:xml.cpp

示例4: handleError

// ---------------------------------------------------------------------------
//  XIncludeHandlers: Overrides of the DOM ErrorHandler interface
// ---------------------------------------------------------------------------
bool XIncludeErrorHandler::handleError(const DOMError& domError)
{
	bool continueParsing = true;
    if (domError.getSeverity() == DOMError::DOM_SEVERITY_WARNING)
        XERCES_STD_QUALIFIER cerr << "\nWarning at file ";
    else if (domError.getSeverity() == DOMError::DOM_SEVERITY_ERROR)
    {
        XERCES_STD_QUALIFIER cerr << "\nError at file ";
        fSawErrors = true;
    }
	else {
        XERCES_STD_QUALIFIER cerr << "\nFatal Error at file ";
		continueParsing = false;
        fSawErrors = true;
	}

    XERCES_STD_QUALIFIER cerr << StrX(domError.getLocation()->getURI())
         << ", line " << domError.getLocation()->getLineNumber()
         << ", char " << domError.getLocation()->getColumnNumber()
         << "\n  Message: " << StrX(domError.getMessage()) << XERCES_STD_QUALIFIER endl;

    return continueParsing;
}
开发者ID:QEver,项目名称:vosproj,代码行数:26,代码来源:XInclude.cpp

示例5: handleError

 /// Dom Error handler callback
 bool DocumentErrorHandler::handleError(const DOMError& domError) {
   string err = "DOM UNKNOWN: ";
   switch (domError.getSeverity()) {
   case DOMError::DOM_SEVERITY_WARNING:
     err = "DOM WARNING: ";
     break;
   case DOMError::DOM_SEVERITY_ERROR:
     err = "DOM ERROR:   ";
     break;
   case DOMError::DOM_SEVERITY_FATAL_ERROR:
     err = "DOM FATAL:   ";
     break;
   default:
     return false;
   }
   printout(FATAL,"DocumentErrorHandler", "+++ %s %s: %s", err.c_str(),
            _toString(domError.getType()).c_str(),_toString(domError.getMessage()).c_str());
   DOMLocator* loc = domError.getLocation();
   if (loc) {
     printout(FATAL,"DocumentErrorHandler","+++ Location: Line:%d Column: %d",
              int(loc->getLineNumber()),int(loc->getColumnNumber()));
   }
   return false;
 }
开发者ID:vvolkl,项目名称:DD4hep,代码行数:25,代码来源:DocumentHandler.cpp


注:本文中的DOMError::getLocation方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。