astx.exceptions

astx.exceptions

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

title: Module for Exceptions.

Classes

ThrowStmt(StatementType)

title: AST class for throw statements.
attributes:
  kind:
    type: ASTKind
  exception:
    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.
attributes:
  kind:
    type: ASTKind
  body:
    type: Block[AST]
  name:
    type: Optional[Identifier]
  types:
    type: Optional[ASTNodes[Identifier]]

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.
attributes:
  kind:
    type: ASTKind
  body:
    type: Block[AST]
  handlers:
    type: ASTNodes[CatchHandlerStmt]
  finally_handler:
    type: Optional[FinallyHandlerStmt]

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