Documentation

astx.exceptions

astx.exceptions

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

title: Module for Exceptions.

Classes

ThrowStmt(StatementType)

title: AST class for throw statements.
summary: >-
  An absent exception models re-raising. An absent cause differs from an
  explicit LiteralNone, which suppresses implicit diagnostic context.
attributes:
  kind:
    type: ASTKind
  exception:
    type: Optional[Expr]
  cause:
    type: Optional[Expr]

Methods

get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
  simplified:
    type: bool
returns:
  type: ReprStruct

CatchHandlerStmt(StatementType)

title: AST class for catch statements.
summary: >-
  None means an untyped handler; an empty collection stays empty for
  semantic validation. Expressions allow qualified nominal references.
  Every supplied collection item is validated, including lazy iterables.
attributes:
  kind:
    type: ASTKind
  body:
    type: Block[AST]
  name:
    type: Optional[Identifier]
  types:
    type: Optional[ASTNodes[Expr]]

Methods

get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
  simplified:
    type: bool
returns:
  type: ReprStruct

ExceptionHandlerStmt(StatementType)

title: AST class for try statements.
summary: >-
  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:
  kind:
    type: ASTKind
  body:
    type: Block[AST]
  handlers:
    type: ASTNodes[CatchHandlerStmt]
  finally_handler:
    type: Optional[FinallyHandlerStmt]
  else_body:
    type: Optional[Block[AST]]

Methods

get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
  simplified:
    type: bool
returns:
  type: ReprStruct

FinallyHandlerStmt(StatementType)

title: AST class for finally statements.
attributes:
  kind:
    type: ASTKind
  body:
    type: Block[AST]

Methods

get_struct(self, simplified: bool=False) -> ReprStruct
title: Return the AST structure of the object.
parameters:
  simplified:
    type: bool
returns:
  type: ReprStruct

Search documentation

Type to search.