XMLParseException Class Reference

An XMLParseException is thrown when an error occures while parsing an XML stream. More...

#include <XMLParseException.h>

Inheritance diagram for XMLParseException:

Exception

List of all members.

Public Member Functions

 XMLParseException (string name, string message)
 Creates an exception.
 XMLParseException (string name, int lineNr, string message)
 Creates an exception.
int getLineNr ()
 Where the error occurred, or NO_LINE if the line number is unknown.
void setMessage (string message)
 Sets the error message for the exception.
string getMessage ()
 Gets the error message for the exception.

Static Public Attributes

static int NO_LINE = -1
 Indicates that no line number has been associated with this exception.

Private Attributes

int lineNr
 The line number in the source code where the error occurred, or NO_LINE if the line number is unknown.


Detailed Description

An XMLParseException is thrown when an error occures while parsing an XML stream.

Definition at line 28 of file XMLParseException.h.


Constructor & Destructor Documentation

XMLParseException::XMLParseException ( string  name,
string  message 
)

Creates an exception.

Parameters:
name The name of the element where the error is located.
message A message describing what went wrong.

Definition at line 18 of file XMLParseException.cpp.

References lineNr, NO_LINE, and Exception::setMessage().

XMLParseException::XMLParseException ( string  name,
int  lineNr,
string  message 
)

Creates an exception.

Parameters:
name The name of the element where the error is located.
lineNr The number of the line in the input.
message A message describing what went wrong.

Definition at line 29 of file XMLParseException.cpp.

References StringManipulation::intToString(), and Exception::setMessage().


Member Function Documentation

int XMLParseException::getLineNr (  ) 

Where the error occurred, or NO_LINE if the line number is unknown.

Returns:
Line number where the error occurred.

Definition at line 41 of file XMLParseException.cpp.

References lineNr.

void Exception::setMessage ( string  message  )  [inherited]

Sets the error message for the exception.

Definition at line 24 of file Exception.cpp.

Referenced by Exception::Exception(), and XMLParseException().

string Exception::getMessage (  )  [inherited]

Gets the error message for the exception.

Definition at line 29 of file Exception.cpp.

References Exception::message.

Referenced by QMCJastrowParameters::getPoles().


Member Data Documentation

int XMLParseException::NO_LINE = -1 [static]

Indicates that no line number has been associated with this exception.

Definition at line 33 of file XMLParseException.h.

Referenced by XMLParseException().

The line number in the source code where the error occurred, or NO_LINE if the line number is unknown.

Definition at line 40 of file XMLParseException.h.

Referenced by getLineNr(), and XMLParseException().


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

Generated on Sat Jul 5 16:14:07 2008 for QMcBeaver by  doxygen 1.5.6