Package yagdoc :: Module parser :: Class ParserError
[show private | hide private]
[frames | no frames]

Type ParserError

   object --+            
            |            
BaseException --+        
                |        
        Exception --+    
                    |    
            DataError --+
                        |
                       ParserError


Cannot parse block
Method Summary
  __init__(self, filename, line, lines, soup)
Create a new parser error.
str format_gcc(self, maxlines, maxtokens)
Format error into a GCC-style message.
Inherited from Exception: __new__
Inherited from BaseException: __delattr__, __getattribute__, __getitem__, __reduce__, __repr__, __setattr__, __setstate__, __str__
Inherited from object: __hash__, __reduce_ex__

Instance Variable Summary
Inherited from DataError: column, detail, filename, line

Class Variable Summary
Inherited from BaseException: args, message

Method Details

__init__(self, filename, line, lines, soup)
(Constructor)

Create a new parser error.
Parameters:
lines - Failed (and skipped) lines.
soup - Failed token soup.
Overrides:
yagdoc.common.DataError.__init__

format_gcc(self, maxlines=-1, maxtokens=-1)

Format error into a GCC-style message.

The message details include the failed token soup, this is controlled with maxtokens.

The one-line message can be followed by quotation of the failed block, this is controlled with maxlines.
Parameters:
maxlines - The maximum number of lines of the failed block to quote. If not given or negative, there is no length limit on the quotation. Ellipsis is used in the middle to represent the excluded lines.
           (type=int)
maxtokens - The maximum number of tokens to dump (from the begining). If not given or negative, there is no length limit on the soup dump.
           (type=int)
Returns:
GCC-style formatted error message on the first line, possibly followed quotation of the failed source code block, terminated with a newline.
           (type=str)
Overrides:
yagdoc.common.DataError.format_gcc

Generated by Epydoc 2.1 on Fri Oct 5 00:36:53 2007 http://epydoc.sf.net