本文整理汇总了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();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}