Exception raised while parsing a template
| 57 | |
| 58 | |
| 59 | class TemplateError(Exception): |
| 60 | """Exception raised while parsing a template |
| 61 | """ |
| 62 | |
| 63 | def __init__(self, message, position, name=None): |
| 64 | Exception.__init__(self, message) |
| 65 | self.position = position |
| 66 | self.name = name |
| 67 | |
| 68 | def __str__(self): |
| 69 | msg = ' '.join(self.args) |
| 70 | if self.position: |
| 71 | msg = '%s at line %s column %s' % ( |
| 72 | msg, self.position[0], self.position[1]) |
| 73 | if self.name: |
| 74 | msg += ' in %s' % self.name |
| 75 | return msg |
| 76 | |
| 77 | |
| 78 | class _TemplateContinue(Exception): |
no outgoing calls
no test coverage detected