Error Handling Guide¶
Overview¶
The [ah_no.h](Files/ah__no_8h.md#file-ah-no.h) header provides emergency halt functionality for handling unrecoverable system errors on bare-metal embedded systems. When a fatal error is detected and continuing execution would be unsafe, applications should invoke [CFBD_AH_NO()](Modules/group__Core__Utilities.md#function-cfbd-ah-no) to enter a halt state.
Usage Pattern¶
#include "lib/config/ah_no.h"
// Example: Halt on critical failure
if (critical_resource_failed) {
// Log or signal error if needed
CFBD_AH_NO(); // Enter infinite halt
// Execution never reaches here
}
Platform Integration¶
On many platforms, external mechanisms like watchdogs or debuggers can detect and handle the halt state:
- Watchdog timers can trigger system reset
- Debuggers can break on the infinite loop
- Custom firmware may signal error indicators before the halt
Updated on 2026-02-03 at 13:21:55 +0000