Skip to content

exceptions

Define custom Exceptions to improve error message.

Classes:

CodeGenException

CodeGenException(message: str)

Bases: Exception

Handle exceptions for the CodeGen phase.

Source code in src/arx/exceptions.py
15
16
17
def __init__(self, message: str) -> None:
    """Initialize ParserException."""
    super().__init__(f"CodeGenError: {message}")

ParserException

ParserException(message: str)

Bases: Exception

Handle exceptions for the Parser phase.

Source code in src/arx/exceptions.py
7
8
9
def __init__(self, message: str) -> None:
    """Initialize ParserException."""
    super().__init__(f"ParserError: {message}")