Mercurial > lcfOS
diff python/ppci/errors.py @ 194:b01429a5d695
Fixed test
author | Windel Bouwman |
---|---|
date | Wed, 29 May 2013 22:36:37 +0200 |
parents | 6b2bec5653f1 |
children | 5e391d9a3381 |
line wrap: on
line diff
--- a/python/ppci/errors.py Sun May 26 23:58:59 2013 +0200 +++ b/python/ppci/errors.py Wed May 29 22:36:37 2013 +0200 @@ -3,10 +3,13 @@ Diagnostic utils """ +from . import SourceLocation + class CompilerError(Exception): def __init__(self, msg, loc): self.msg = msg self.loc = loc + assert type(loc) is SourceLocation, '{0} must be SourceLocation'.format(type(loc)) def __repr__(self): return 'Compilererror {0} at row {1}'.format(self.msg, self.loc.row)