irx.analysis.exception_types
irx.analysis.exception_types
Source: packages/irx/src/irx/analysis/exception_types.py
title: Host-registered exception identities and ordinary class construction.
summary: >-
Exception privileges come from declaration identities, never source spelling.
Hosts and direct AST clients share one validated builtin hierarchy contract.Functions
builtin_exception_module() -> ParsedModule
title: Build language-neutral builtin exceptions for direct AST hosts.
summary: >-
Return fresh declaration identities and their explicit ParsedModule
capability, suitable for a host resolver without source parsing. The
hierarchy uses the same schema validated for frontend-supplied builtins.
returns:
type: ParsedModuleexception_error(analyzer: SemanticAnalyzerCore, node: astx.AST, message: str) -> None
title: Report an invalid nominal exception contract.
parameters:
analyzer:
type: SemanticAnalyzerCore
node:
type: astx.AST
message:
type: strexception_class_type(class_: SemanticClass) -> astx.ClassType
title: Preserve nominal ancestry in an exception expression type.
parameters:
class_:
type: SemanticClass
returns:
type: astx.ClassTyperegister_exception_types(analyzer: SemanticAnalyzerCore) -> None
title: Attach validated base slots and nominal identities after layout.
parameters:
analyzer:
type: SemanticAnalyzerCoreresolve_exception_construction(analyzer: SemanticAnalyzerCore, node: astx.ClassConstruct | astx.FunctionCall | astx.MethodCall, class_: SemanticClass) -> None
title: Bind inherited message construction without special source names.
parameters:
analyzer:
type: SemanticAnalyzerCore
node:
type: astx.ClassConstruct | astx.FunctionCall | astx.MethodCall
class_:
type: SemanticClassbind_direct_exception_names(analyzer: SemanticAnalyzerCore, node: astx.AST) -> None
title: Bind direct-AST ambient names without replacing user declarations.
parameters:
analyzer:
type: SemanticAnalyzerCore
node:
type: astx.AST