Adding check to disable wrapping inner function bodies in try/except for error reporting until we can support this.
PiperOrigin-RevId: 206767387
This commit is contained in:
parent
217dd20c5e
commit
5efec22b56
@ -37,7 +37,8 @@ class ErrorRewritingTransformer(converter.Base):
|
||||
def visit_FunctionDef(self, node):
|
||||
node = self.generic_visit(node)
|
||||
|
||||
if anno.hasanno(node, anno.Basic.ORIGIN):
|
||||
if (anno.hasanno(node, anno.Basic.ORIGIN) and
|
||||
len(self.enclosing_entities) <= 1):
|
||||
template = """
|
||||
try:
|
||||
body
|
||||
|
Loading…
Reference in New Issue
Block a user