Error module

nRF5 SDK v9.0.0

nRF51 SDK v9.0.0

The error module provides the weak function app_error_handler for handling application errors. This function is used by most applications if it is not defined explicitly in the application code.

The behavior of the error handler differs depending on whether the DEBUG flag is set:

  • If the DEBUG flag is set:

    When app_error_handler is invoked, the function parameters (error code, line number, and file name) are copied to global memory, interrupts are disabled, and the application enters an infinite loop.

    If the BSP_DEFINES_ONLY flag is set, all LEDs available on the board are turned on.

    If the BSP_DEFINES_ONLY flag is not set, the BSP_INDICATE_FATAL_ERROR state is indicated.


Please send us your feedback about the documentation! For technical questions, visit the Nordic Developer Zone .