2010-06-12 | Paul Boddie | raw files shortlog changelog graph | Fixed overwriting of exception source details. | |
micropython/common.py (file) |
1.1 --- a/micropython/common.py Sat Jun 12 21:33:36 2010 +0200 1.2 +++ b/micropython/common.py Sat Jun 12 21:39:53 2010 +0200 1.3 @@ -36,8 +36,9 @@ 1.4 try: 1.5 return compiler.visitor.ASTVisitor.dispatch(self, node, *args) 1.6 except NodeProcessingError, exc: 1.7 - exc.astnode = node 1.8 - exc.unit_name = self.full_name() 1.9 + if exc.astnode is None: 1.10 + exc.astnode = node 1.11 + exc.unit_name = self.full_name() 1.12 raise 1.13 1.14 # Errors.