# helia_aot.errors

## heliaAOT Errors API

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.

## helia_aot.errors.HeliaAotError

`class` · `python`

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

Base class for user-facing heliaAOT failures.

**Parameters**

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| message | str | Required | What went wrong, phrased for the user. |
| hint | str \| None | None | One actionable next step (rendered dim below the error). |
| details | str \| None | None | Supporting output (e.g. tool stderr), rendered dim. |

Source: `helia_aot/errors.py:15`

### helia_aot.errors.HeliaAotError.hint

`attribute` · `python`

```python
hint = hint
```

Source: `helia_aot/errors.py:26`

### helia_aot.errors.HeliaAotError.details

`attribute` · `python`

```python
details = details
```

Source: `helia_aot/errors.py:27`

## helia_aot.errors.ModelLoadError

`class` · `python`

```python
ModelLoadError()
```

The input model could not be found or parsed.

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

Source: `helia_aot/errors.py:36`

## helia_aot.errors.OutputExistsError

`class` · `python`

```python
OutputExistsError()
```

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

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

Source: `helia_aot/errors.py:44`

## helia_aot.errors.ConfigValueError

`class` · `python`

```python
ConfigValueError()
```

A configuration value is invalid for the requested conversion.

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

Source: `helia_aot/errors.py:52`

## helia_aot.errors.UnsupportedModelError

`class` · `python`

```python
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.

Source: `helia_aot/errors.py:59`

## helia_aot.errors.TemplateRenderError

`class` · `python`

```python
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.

Source: `helia_aot/errors.py:69`

## helia_aot.errors.GoldenDataKeyError

`class` · `python`

```python
GoldenDataKeyError()
```

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

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

Source: `helia_aot/errors.py:82`
