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

Public Member Functions

virtual ~ErrorHandler ()
 
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

Definition at line 26 of file mainhandler.cpp.

Constructor & Destructor Documentation

virtual ErrorHandler::~ErrorHandler ( )
inlinevirtual

Definition at line 29 of file mainhandler.cpp.

29 {}

Member Function Documentation

bool ErrorHandler::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 34 of file mainhandler.cpp.

35  {
36  return FALSE;
37  }
const bool FALSE
Definition: qglobal.h:370
QString ErrorHandler::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 45 of file mainhandler.cpp.

45 { return ""; }
bool ErrorHandler::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 38 of file mainhandler.cpp.

39  {
40  debug(1,"Fatal error at line %d column %d: %s\n",
41  exception.lineNumber(),exception.columnNumber(),
42  exception.message().data());
43  return FALSE;
44  }
const bool FALSE
Definition: qglobal.h:370
int columnNumber() const
Definition: qxml.cpp:231
QString message() const
Definition: qxml.cpp:224
const char * data() const
Definition: qstring.h:542
int lineNumber() const
Definition: qxml.cpp:238
bool ErrorHandler::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 30 of file mainhandler.cpp.

31  {
32  return FALSE;
33  }
const bool FALSE
Definition: qglobal.h:370

Member Data Documentation

QString ErrorHandler::errorMsg
private

Definition at line 48 of file mainhandler.cpp.


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