WEBSITE ALPHA · AI-assisted, source-reviewed documentation · Full-stack docs reconciled 2026-08-26
64x64base

Error Codes

Canonical xBase_64 error identity: HRESULT-style severity, facility, and code.

This page is a website derivative of the engine's canonical error catalog. The codes, facilities, severities, and messages are harvested from include/xbase_error_codes.hpp (mirrored in src/cli/xbase_error_codes.cpp).

Publication rule: runtime/source truth wins over this page. Regenerate or review it whenever the error catalog, ERROR_STATUS mapping, or the cmdout emission contract changes.

Harvest anchor: DIAG-ERRCODE-010.

Code identity (HRESULT-style)

Every xBase_64 error code is a packed 32-bit value with a stable ABI:

 31      sign bit (always 1 for xBase_64 codes)
 30..29  severity   (2 bits)
 28..16  facility   (13 bits)
 15..0   code number (16 bits)

A code is written compactly as facility/0xNNNN — for example, the I/O write failure is io/0x0001. Helper accessors (get_severity, get_facility, get_number, ok, failed) decode the packed value; ok() is severity success.

Severities

SeverityValueMeaning
success0Operation succeeded (ok()).
warning1Completed with a caveat; not a failure.
error2Operation failed.

Facilities (subsystems)

FacilityValueScope
general0x0001Cross-cutting engine errors.
dbf640x0002DBF_64 table format.
fpt640x0003FPT64 memo format.
security0x0004Security policy / elevated-write guards.
cli0x0005Command-line parsing and command preconditions.
io0x0006File input/output.
runtime0x0007Runtime/execution (reserved).

Canonical code catalog

Source-derived from the ERROR_STATUS symbol mapping and the message() table. ok() is the success sentinel; w_* are warnings.

IdentitySymbolSeverityMessage
general/0x0000oksuccessOK
general/0x0001e_unknown (E_UNKNOWN)errorUnknown error
general/0x0002e_invalid_argumenterrorInvalid argument
general/0x0003e_not_implementederrorNot implemented
dbf64/0x0001e_dbf_header_invaliderrorDBF_64 header invalid
dbf64/0x0002e_dbf_record_out_of_rangeerrorDBF_64 record out of range
fpt64/0x0001e_fpt_block_invaliderrorFPT64 block invalid
security/0x0001e_security_policy_violationerrorSecurity policy violation
security/0x0002e_security_elevated_write_forbiddenerrorSecurity: elevated write forbidden
cli/0x0001e_cli_parse_errorerrorCLI parse error
cli/0x0002e_no_table_openerrorNo table open.
cli/0x0003e_invalid_record_numbererrorInvalid record number.
cli/0x0004e_invalid_current_recorderrorInvalid current record.
cli/0x0005e_missing_argumenterrorMissing required argument.
cli/0x0006e_unrecognized_command_formerrorUnrecognized command form.
cli/0x0007e_area_qualifier_not_supportederrorArea qualifier not supported yet.
cli/0x0008e_order_unavailableerrorOrdered backend unavailable.
cli/0x0009w_for_clause_ignoredwarningFOR clause ignored.
cli/0x000Aw_order_fallback_physicalwarningFalling back to physical order.
io/0x0001e_io_write_failederrorI/O write failed.

How errors surface

Commands raise a canonical code and a localized message through the cmdout channel (src/cli/command_output.hpp): emit_error(cmd, code, ...) / emit_warning(...) print the localized text and record the code via set_last_error, so the same failure is inspectable through the ERROR_STATUS command and (as it is wired) haltable under SET ERRORSTOP. Message text is localized — see Messaging & Localization.

Status

This catalog is source-defined and runtime-proven for the codes it lists (the EXPORTFUNCTIONS I/O path was the first end-to-end proof of e_io_write_failed through ERROR_STATUS). It is not a claim that every command already routes its diagnostics through canonical codes: adoption across the full command surface, and SET ERRORSTOP halting for every converted command, is an active engineering lane, not a finished state.