forked from M-Labs/artiq
transforms/inline: support catchall 'except' clauses
This commit is contained in:
parent
bad87ef38b
commit
e8c92c3b6f
|
@ -232,6 +232,7 @@ class _ReferenceReplacer(ast.NodeVisitor):
|
|||
def visit_ExceptHandler(self, node):
|
||||
if node.name is not None:
|
||||
raise NotImplementedError("'as target' is not supported")
|
||||
if node.type is not None:
|
||||
exception_class = self.rm.get(self.obj, self.func_name, node.type)
|
||||
if not inspect.isclass(exception_class):
|
||||
raise NotImplementedError("Exception type must be a class")
|
||||
|
|
Loading…
Reference in New Issue