Skip to content

Error code reference

Each FloxError carries a stable code (e.g. E_SYM_001), a human message, and a help URL pointing to the per-code page in this section. AI agents reading FLOX errors can resolve the code to a documented fix without parsing free-text messages.

Code format

E_<DOMAIN>_<NUMBER>DOMAIN is a short uppercase tag identifying the subsystem; NUMBER is a zero-padded 3-digit counter within that domain. Codes never change meaning once published; if the cause shifts, a new code is allocated.

Domain Subsystem
SYM Symbol registry / lookups
DATA Input data loading and parsing
INPUT Tape loading and input validation
KEY Event field lookups and required keys
TIME Calendar, intervals, timestamps
LEN Array length mismatches
VAL Binding argument validation
GRAPH Indicator graph construction
ADF ADF stationarity test
RUN Backtest / runner lifecycle
BACKTEST Backtest configuration and execution
IO Filesystem and binary log I/O

Catalog

Every code has its own page in this directory (E_<DOMAIN>_<NNN>.md); a few representative entries:

Code Message
E_SYM_001 Symbol is not registered
E_RUN_003 Invalid factory return value (GridSearch)
E_ADF_001 ADF — invalid regression mode

Browse the full set by opening any E_*.md in this folder.

How to add a new code

  1. Decide on a domain. If a new domain is needed, add it to the table above.
  2. Pick the next number in that domain.
  3. Write a Markdown page docs/errors/<code>.md with the frontmatter shown below.
  4. Use the code at the throw site:

    throw flox::FloxError(
        "E_SYM_001",
        "Symbol '" + name + "' is not registered. ...");
    
  5. Run python3 scripts/check_error_codes.py (it also runs in CI). It verifies every code referenced from source has a Markdown page and vice-versa.

Frontmatter convention

---
code: E_SYM_001
title: Symbol is not registered
severity: error
since: 0.1.0
---