API reference

python:astx:astx.exceptions.ExceptionHandlerStmt

class ExceptionHandlerStmt

ExceptionHandlerStmt(body: Block[AST], handlers: Iterable[CatchHandlerStmt] | ASTNodes[CatchHandlerStmt], finally_handler: Optional[FinallyHandlerStmt] = None, parent: Optional[ASTNodes] = None, loc: SourceLocation = NO_SOURCE_LOCATION, *, else_body: Optional[Block[AST]] = None)

Source: packages/astx/src/astx/exceptions.py:212

AST class for try statements.

Preserve protected, handler, normal-completion, and finalization suites as separate children. An absent else suite differs from an empty block. Clause validity and execution support belong to semantic analysis.

Attributes

Methods

Attributes

Search documentation

Type to search.