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


C++ SAXParseException类代码示例

本文整理汇总了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;
}
开发者ID:jjiezheng,项目名称:pap_full,代码行数:10,代码来源:SAX2PrintHandlers.cpp

示例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;
}
开发者ID:xin3liang,项目名称:platform_external_xerces-cpp,代码行数:7,代码来源:StdInParseHandlers.cpp

示例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);

}
开发者ID:12019,项目名称:svn.gov.pt,代码行数:31,代码来源:XMLParser.cpp

示例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;
}
开发者ID:welcheb,项目名称:jemris,代码行数:7,代码来源:DOMTreeErrorReporter.cpp

示例5: printWarning

void
operativeMachine::warning (const SAXParseException & e)
{
  printWarning("operativeMachine at file " + 
	       a2b::XMLChar2string (e.getSystemId ()),
	       a2b::XMLChar2string(e.getMessage ()));
}
开发者ID:13572293130,项目名称:XOgastan,代码行数:7,代码来源:operativeMachine.cpp

示例6: bad_XOgastan

void
operativeMachine::error (const SAXParseException & e)
{
  throw bad_XOgastan("operativeMachine at file " + 
		     a2b::XMLChar2string (e.getSystemId ()),
		     a2b::XMLChar2string (e.getMessage ()));
}
开发者ID:13572293130,项目名称:XOgastan,代码行数:7,代码来源:operativeMachine.cpp

示例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());
}
开发者ID:TheProjecter,项目名称:gcat-project,代码行数:7,代码来源:DAGXMLParser.cpp

示例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;
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:7,代码来源:InitTermTest.cpp

示例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;
}
开发者ID:nairnj,项目名称:nairn-mpm-fea,代码行数:8,代码来源:CommonReadHandler.cpp

示例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()));
}
开发者ID:eroux,项目名称:transcriber-ag,代码行数:7,代码来源:SAX_TransAGHandler.cpp

示例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;
}
开发者ID:kanbang,项目名称:Colt,代码行数:7,代码来源:XSTSHarness.cpp

示例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();
}
开发者ID:BackupTheBerlios,项目名称:kinneret,代码行数:7,代码来源:xml.cpp

示例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;
}
开发者ID:huilang22,项目名称:Projects,代码行数:8,代码来源:DOMTreeErrorReporter.cpp

示例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;
}
开发者ID:brock7,项目名称:TianLong,代码行数:11,代码来源:XSerializerHandlers.cpp

示例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;
}
开发者ID:NeziheSozen,项目名称:sumo,代码行数:8,代码来源:OptionsLoader.cpp


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