Public Member Functions | Private Attributes | List of all members
XMLErrorHandler Class Reference
Inheritance diagram for XMLErrorHandler:
QXmlErrorHandler

Public Member Functions

virtual ~XMLErrorHandler ()
 
bool warning (const QXmlParseException &)
 
bool error (const QXmlParseException &)
 
bool fatalError (const QXmlParseException &exception)
 
QString errorString ()
 
- Public Member Functions inherited from QXmlErrorHandler
virtual ~QXmlErrorHandler ()
 

Private Attributes

QString errorMsg
 

Detailed Description

Class for handling error during XML parsing

Definition at line 281 of file doxyindexer.cpp.

Constructor & Destructor Documentation

virtual XMLErrorHandler::~XMLErrorHandler ( )
inlinevirtual

Definition at line 284 of file doxyindexer.cpp.

284 {}

Member Function Documentation

bool XMLErrorHandler::error ( const QXmlParseException exception)
inlinevirtual

A reader might use this function to report a recoverable error. A recoverable error corresponds to the definiton of "error" in section 1.2 of the XML 1.0 specification.

The reader must continue to provide normal parsing events after invoking this function.

If this function returns FALSE the reader will stop parsing and will report an error. The reader will use the function errorString() to get the error message that will be used for reporting the error.

Implements QXmlErrorHandler.

Definition at line 289 of file doxyindexer.cpp.

290  {
291  return FALSE;
292  }
const bool FALSE
Definition: qglobal.h:370
QString XMLErrorHandler::errorString ( )
inlinevirtual

The reader calls this function to get an error string if any of the handler functions returns FALSE to him.

Implements QXmlErrorHandler.

Definition at line 300 of file doxyindexer.cpp.

300 { return ""; }
bool XMLErrorHandler::fatalError ( const QXmlParseException exception)
inlinevirtual

A reader must use this function to report a non-recoverable error.

If this function returns TRUE the reader might try to go on parsing and reporting further errors; but no regular parsing events are reported.

Implements QXmlErrorHandler.

Definition at line 293 of file doxyindexer.cpp.

294  {
295  std::cerr << "Fatal error at line " << exception.lineNumber()
296  << " column " << exception.columnNumber() << ": "
297  << exception.message().utf8() << std::endl;
298  return FALSE;
299  }
const bool FALSE
Definition: qglobal.h:370
int columnNumber() const
Definition: qxml.cpp:231
QString message() const
Definition: qxml.cpp:224
QCString utf8() const
Definition: qstring.cpp:14507
int lineNumber() const
Definition: qxml.cpp:238
QTextStream & endl(QTextStream &s)
bool XMLErrorHandler::warning ( const QXmlParseException exception)
inlinevirtual

A reader might use this function to report a warning. Warnings are conditions that are not errors or fatal errors as defined by the XML 1.0 specification.

If this function returns FALSE the reader will stop parsing and will report an error. The reader will use the function errorString() to get the error message that will be used for reporting the error.

Implements QXmlErrorHandler.

Definition at line 285 of file doxyindexer.cpp.

286  {
287  return FALSE;
288  }
const bool FALSE
Definition: qglobal.h:370

Member Data Documentation

QString XMLErrorHandler::errorMsg
private

Definition at line 303 of file doxyindexer.cpp.


The documentation for this class was generated from the following file: