irx.analysis.handlers.exceptions
irx.analysis.handlers.exceptions
Source: packages/irx/src/irx/analysis/handlers/exceptions.py
title: Nominal exception statements and lexical handler bindings.Functions
exception_source_nodes(node: astx.AST) -> Iterator[astx.AST]
title: Inspect one exceptional region without crossing nested functions.
parameters:
node:
type: astx.AST
returns:
type: Iterator[astx.AST]Classes
ExceptionVisitorMixin(SemanticVisitorMixinBase)
title: Resolve exception statements before backend control-flow emission.Methods
reject_exception_references(self, node: astx.AST, symbols: set[str], message: str) -> None
title: Reject exceptional-path accesses to unavailable owned bindings.
parameters:
node:
type: astx.AST
symbols:
type: set[str]
message:
type: strexception_value(self, node: astx.Expr) -> ResolvedExceptionType | None
title: Require an ordinary instance of a registered exception subtype.
parameters:
node:
type: astx.Expr
returns:
type: ResolvedExceptionType | Nonehandler_type(self, node: astx.Expr) -> ResolvedExceptionType | None
title: Resolve nominal type references using ordinary lexical bindings.
parameters:
node:
type: astx.Expr
returns:
type: ResolvedExceptionType | Nonevisit(self, node: astx.ThrowStmt) -> None
title: Resolve explicit raises and dynamic bare re-raises.
parameters:
node:
type: astx.ThrowStmtvisit(self, node: astx.CatchHandlerStmt) -> None
title: Bind a handler-local owned reference and validate its body.
parameters:
node:
type: astx.CatchHandlerStmtvisit(self, node: astx.FinallyHandlerStmt) -> None
title: Validate a finalizer in its own lexical initialization scope.
parameters:
node:
type: astx.FinallyHandlerStmtvisit(self, node: astx.ExceptionHandlerStmt) -> None
title: Validate ordered handlers and isolated exceptional scopes.
parameters:
node:
type: astx.ExceptionHandlerStmt