MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / add_error_node

Method add_error_node

tensorflow/python/autograph/pyct/cfg.py:442–453  ·  view source on GitHub ↗

Grows the graph by adding an error node. This node becomes an exit for the entire graph. Args: ast_node: ast.AST guards: Tuple[ast.AST, ...], the finally sections that guard ast_node

(self, ast_node, guards)

Source from the content-addressed store, hash-verified

440 self.continues[section_id].add(node)
441
442 def add_error_node(self, ast_node, guards):
443 """Grows the graph by adding an error node.
444
445 This node becomes an exit for the entire graph.
446
447 Args:
448 ast_node: ast.AST
449 guards: Tuple[ast.AST, ...], the finally sections that guard ast_node
450 """
451 node = self._add_jump_node(ast_node, guards)
452 self.errors.add(node)
453 self.leaves = set()
454
455 def enter_section(self, section_id):
456 """Enters a regular section.

Callers 1

visit_RaiseMethod · 0.80

Calls 2

_add_jump_nodeMethod · 0.95
addMethod · 0.45

Tested by

no test coverage detected