API reference

python:astx:astx.ThrowStmt

class ThrowStmt

ThrowStmt(exception: Optional[Expr] = None, parent: Optional[ASTNodes] = None, loc: SourceLocation = NO_SOURCE_LOCATION, *, cause: Optional[Expr] = None)

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

Declared as: python:astx:astx.exceptions.ThrowStmt

AST class for throw statements.

An absent exception models re-raising. An absent cause differs from an explicit LiteralNone, which suppresses implicit diagnostic context.

Attributes

Methods

Attributes

Search documentation

Type to search.