FileParseError

Raised when a parse error is encountered while reading a text file. If the file is a LineReader, source location information is available.

Base Classes

Methods

__init__(self, file, text, lineNum)

   def __init__(self, file, text, lineNum = None):

Constructs a FileFormatError from a file object and a message text string.

If a line number is explicitly provided or a LineReader object is used for file, the line number of the error is made available.

__str__(self)

   def __str__(self):

Creates a string containing source information

getLineNum(self)

   def getLineNum(self):

Returns the line number of the source file in which the error occurred. Returns None if the file object was not a lineReader.

getSourceName(self)

   def getSourceName(self):

Returns the name of the source file.