Example #1
0
    void xml_handler_base::warning(const xercesc::SAXParseException& e)
    {
        XMLFileLoc line_num = e.getLineNumber();
        std::string message(xml_utility::transcode(e.getMessage()));

        std::cerr << "XML parse warning: (line " << line_num << ") ";
        std::cerr << message << std::endl;
    }
Example #2
0
void ParserErrorHandler::reportParseException(const xercesc::SAXParseException &spExept)
{
    char *message = xercesc::XMLString::transcode(spExept.getMessage());

    std::cerr << " at line " << spExept.getLineNumber() << ", column " << spExept.getColumnNumber() <<":\n" << message <<std::endl;

    xercesc::XMLString::release(&message);
}
Example #3
0
void XMLReader::fatalError( const xercesc::SAXParseException &e )
{
     int line = e.getLineNumber();
     std::string message( transcodeString( e.getMessage() ) );

     throw XmlParseException( boost::str( boost::format(
         "XML parse error (line: %d): %s" )
         % line % message ) );
}
Example #4
0
    void xml_handler_base::fatalError(const xercesc::SAXParseException& e)
    {
        XMLFileLoc line_num = e.getLineNumber();
        const std::string message(xml_utility::transcode(e.getMessage()));

        if (line_num == 0)
        {
            boost::throw_exception(variant_error(message));
        }
        else
        {
            boost::throw_exception(variant_error((boost::format("line %d: %s") % static_cast<int>(line_num) % message).str()));
        }
    }
void ConfigurationManager::warning(const xercesc::SAXParseException& e)
{
   std::ostringstream errStrm;
   dtUtil::XMLStringConverter sysIDConverter(e.getSystemId());
   dtUtil::XMLStringConverter msgConverter(e.getMessage());

   errStrm << "\nWarning at file " << sysIDConverter.ToString()
      << ", line " << e.getLineNumber()
      << ", char " << e.getColumnNumber()
      << "\n  Message: " << msgConverter.ToString() << "\n";

   dtUtil::Log::GetInstance().LogMessage(dtUtil::Log::LOG_WARNING, __FUNCTION__,
      __LINE__, errStrm.str());
}
Example #6
0
 void OcfaErrorHandler::fatalError(const xercesc::SAXParseException & e){
     throw InvalidXMLException(message::DomHelper::transcode(e.getMessage()),this);
 }
Example #7
0
 void OcfaErrorHandler::warning(const xercesc::SAXParseException & e){
     if (throwwarn) throw InvalidXMLException(message::DomHelper::transcode(e.getMessage()),this);
 }
Example #8
0
	void fatalError(const xercesc::SAXParseException& exc)
	{
		m_hasError = true;
		m_errorMsg = exc.getMessage();
	}
Example #9
0
void XMLReader::warning( const xercesc::SAXParseException &e )
{
    int line = e.getLineNumber();
    std::string message( transcodeString( e.getMessage() ) );
    std::cerr << "XML parse warning (line " << line << ") " << message << std::endl;
}