本文整理汇总了C++中SAXParseException类的典型用法代码示例。如果您正苦于以下问题:C++ SAXParseException类的具体用法?C++ SAXParseException怎么用?C++ SAXParseException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SAXParseException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: StrX
// ---------------------------------------------------------------------------
// SAX2PrintHandlers: Overrides of the SAX ErrorHandler interface
// ---------------------------------------------------------------------------
void SAX2PrintHandlers::error(const SAXParseException& e)
{
XERCES_STD_QUALIFIER cerr << "\nError at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
}
示例2: fatalError
void StdInParseHandlers::fatalError(const SAXParseException& e)
{
XERCES_STD_QUALIFIER cerr << "\nFatal Error at (file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "): " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
}
示例3: formatError
//***************************************************
// Format the error given by the Xerces parser
// The format is compatible to the gcc errors.
// <filename>:<linenr>:<columnnr>: error: <message>
//***************************************************
void XML_DefHandler::formatError(const SAXParseException& e, const char* filename, std::string& errMsg )
{
std::stringstream str(std::stringstream::out);
char* msg = XMLString::transcode(e.getMessage());
if(filename){
str << filename ;
}
else {
str << "file" ;
}
str << ":"
<< std::dec << e.getLineNumber()
<< ":"
<< std::dec <<e.getColumnNumber()
<< ": error"
<< ": "
<< msg
<< std::endl
;
errMsg = str.rdbuf()->str();
XMLString::release(&msg);
}
示例4: fatalError
void DOMTreeErrorReporter::fatalError(const SAXParseException& toCatch) {
fSawErrors = true;
XERCES_STD_QUALIFIER cerr << "Fatal Error at file \"" << StrX(toCatch.getSystemId())
<< "\", line " << toCatch.getLineNumber()
<< ", column " << toCatch.getColumnNumber()
<< "\n Message: " << StrX(toCatch.getMessage()) << XERCES_STD_QUALIFIER endl;
}
示例5: printWarning
void
operativeMachine::warning (const SAXParseException & e)
{
printWarning("operativeMachine at file " +
a2b::XMLChar2string (e.getSystemId ()),
a2b::XMLChar2string(e.getMessage ()));
}
示例6: bad_XOgastan
void
operativeMachine::error (const SAXParseException & e)
{
throw bad_XOgastan("operativeMachine at file " +
a2b::XMLChar2string (e.getSystemId ()),
a2b::XMLChar2string (e.getMessage ()));
}
示例7: warning
void DAGXMLMasterParser::warning(const SAXParseException& exception) {
char* message = XMLString::transcode(exception.getMessage());
stringstream wrnMsg;
wrnMsg << "DAGXMLMasterParser: " << message << " at line: " << exception.getLineNumber();
XMLString::release(&message);
myutils::warning(wrnMsg.str().c_str());
}
示例8: warning
void InitTermTestErrorHandler::warning(const SAXParseException& e)
{
XERCES_STD_QUALIFIER cerr << "\nWarning at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
}
示例9: warning
// overrides SAX warning Handler
void CommonReadHandler::warning(const SAXParseException& e)
{
cerr << "\nWarning in file " << StrX(e.getSystemId())
<< ", at line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< ": " << StrX(e.getMessage()) << endl;
}
示例10: fatalError
void SAX_TransAGHandler::fatalError(const SAXParseException& e)
{
cerr << "ERROR: " << trans(e.getMessage()) << endl;
cerr << " at line " << e.getLineNumber ()
<< " col " << e.getColumnNumber () << endl;
throw agfio::LoadError(trans(e.getMessage()));
}
示例11: warning
void BaseHarnessHandlers::warning(const SAXParseException& e)
{
XERCES_STD_QUALIFIER cout << "\nWarning at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
}
示例12: throw
string core::xml::getExceptionString(const SAXParseException &ex) throw () {
stringstream result;
result << "SAXParseException: " << xts(ex.getMessage()) << " (line: "
<< ex.getLineNumber() << ", column: " << ex.getColumnNumber() <<
").";
return result.str();
}
示例13: error
void DOMTreeErrorReporter::error(const SAXParseException& toCatch)
{
fSawErrors = true;
cerr << "Error at file \"" << StrX(toCatch.getSystemId())
<< "\", line " << toCatch.getLineNumber()
<< ", column " << toCatch.getColumnNumber()
<< "\n Message: " << StrX(toCatch.getMessage()) << endl;
}
示例14: error
// ---------------------------------------------------------------------------
// XSerializerHandlers: Overrides of the SAX ErrorHandler interface
// ---------------------------------------------------------------------------
void XSerializerHandlers::error(const SAXParseException& e)
{
fSawErrors = true;
XERCES_STD_QUALIFIER cerr << "\nError at file " << StrX(e.getSystemId())
<< ", line " << e.getLineNumber()
<< ", char " << e.getColumnNumber()
<< "\n Message: " << StrX(e.getMessage()) << XERCES_STD_QUALIFIER endl;
}
示例15: toString
void
OptionsLoader::warning(const SAXParseException& exception) {
WRITE_WARNING(TplConvert<XMLCh>::_2str(exception.getMessage()));
WRITE_WARNING(" (At line/column " \
+ toString(exception.getLineNumber()+1) + '/' \
+ toString(exception.getColumnNumber()) + ").");
myError = true;
}