Skip to content
heliaAOT
HELIA HUB

errors

Typed error hierarchy for user-facing failures. A HeliaAotError carries an optional hint (one actionable next step) and optional details (e.g. subprocess output); the CLI renders these as a clean Error: line with a dim hint instead of a traceback, and exits 1.

Copyright 2025 Ambiq. All Rights Reserved.

Machine-readable model

class

Base class for user-facing heliaAOT failures.

helia_aot/errors.py:15

HeliaAotError(message: str, *, hint: str | None = None, details: str | None = None)

Base class for user-facing heliaAOT failures.

Parameters of HeliaAotError
NameTypeDefaultDescription
messagestrRequiredWhat went wrong, phrased for the user.
hintstr | NoneNoneOne actionable next step (rendered dim below the error).
detailsstr | NoneNoneSupporting output (e.g. tool stderr), rendered dim.
class

The input model could not be found or parsed.

helia_aot/errors.py:36

ModelLoadError()

The input model could not be found or parsed.

Also a FileNotFoundError so callers catching the stdlib type keep working.

class

An output path already exists and --force was not given.

helia_aot/errors.py:44

OutputExistsError()

An output path already exists and --force was not given.

Also a FileExistsError so callers catching the stdlib type keep working.

class

A configuration value is invalid for the requested conversion.

helia_aot/errors.py:52

ConfigValueError()

A configuration value is invalid for the requested conversion.

Also a ValueError so callers catching the stdlib type keep working.

class

The input model uses a structure or dtype heliaAOT cannot lower.

helia_aot/errors.py:59

UnsupportedModelError()

The input model uses a structure or dtype heliaAOT cannot lower.

Raised when a graph is recognized but cannot be compiled, so the message can name the recognized construct and the hint can state the supported form. Also a ValueError so callers catching the stdlib type keep working.

class

A codegen template referenced context its handler did not supply.

helia_aot/errors.py:69

TemplateRenderError()

A codegen template referenced context its handler did not supply.

The shared Jinja environment uses StrictUndefined, so an undefined name, a missing attribute, or an out-of-range index raises during emit instead of rendering as the empty string. That is always a heliaAOT defect rather than a user mistake, but it is reachable from a valid model, so the failure is reported with the operator, template, and line that produced it and the original UndefinedError is kept as __cause__. Also a RuntimeError so callers catching the stdlib type keep working.

class

A supplied golden-data archive is missing a required tensor key.

helia_aot/errors.py:82

GoldenDataKeyError()

A supplied golden-data archive is missing a required tensor key.

Also a KeyError so callers catching the stdlib type keep working.