Skip to content

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.

Classes

HeliaAotError

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

Base class for user-facing heliaAOT failures.

Parameters:

  • message

    (str) –

    What went wrong, phrased for the user.

  • hint

    (str | None, default: None ) –

    One actionable next step (rendered dim below the error).

  • details

    (str | None, default: None ) –

    Supporting output (e.g. tool stderr), rendered dim.

ModelLoadError

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

The input model could not be found or parsed.

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

OutputExistsError

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

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

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

ConfigValueError

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

A configuration value is invalid for the requested conversion.

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

UnsupportedModelError

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

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.

GoldenDataKeyError

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

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

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