Package genshi :: Package template :: Module base :: Class BadDirectiveError

Class BadDirectiveError



exceptions.Exception --+        
                       |        
           TemplateError --+    
                           |    
         TemplateSyntaxError --+
                               |
                              BadDirectiveError

Exception raised when an unknown directive is encountered when parsing a template.

An unknown directive is any attribute using the namespace for directives, with a local name that doesn't match any registered directive.



Instance Methods
 
__init__(self, name, filename='<string>', lineno=-1)
Create the exception

Inherited from exceptions.Exception: __getitem__, __str__

Instance Variables

Inherited from TemplateError: filename, lineno, msg, offset

Method Details

__init__(self, name, filename='<string>', lineno=-1)
(Constructor)

 
Create the exception
Parameters:
  • name - the name of the directive
  • filename - the filename of the template
  • lineno - the number of line in the template at which the error occurred
Overrides: TemplateSyntaxError.__init__