Error Codes And Helper Functions - Espressif ESP32-S2 Programming Manual

Table of Contents

Advertisement

Chapter 2. API Reference
ESP_EFUSE_ROM_LOG_ALWAYS_OFF
Disable ROM logging permanently

2.6.6 Error Codes and Helper Functions

This section lists definitions of common ESP-IDF error codes and several helper functions related to error handling.
For general information about error codes in ESP-IDF, see
For the full list of error codes defined in ESP-IDF, see
API Reference
Header File
components/esp_common/include/esp_err.h
Functions
const char
*esp_err_to_name(esp_err_t
Returns string for esp_err_t error codes.
This function finds the error code in a pre-generated lookup-table and returns its string representation.
The function is generated by the Python script tools/gen_esp_err_to_name.py which should be run each time
an esp_err_t error is modified, created or removed from the IDF project.
Return string error message
Parameters
• code: esp_err_t error code
const char
*esp_err_to_name_r(esp_err_t
Returns string for esp_err_t and system error codes.
This function finds the error code in a pre-generated lookup-table of esp_err_t errors and returns its string
representation. If the error code is not found then it is attempted to be found among system errors.
The function is generated by the Python script tools/gen_esp_err_to_name.py which should be run each time
an esp_err_t error is modified, created or removed from the IDF project.
Return buf containing the string error message
Parameters
• code: esp_err_t error code
• [out] buf: buffer where the error message should be written
• buflen: Size of buffer buf. At most buflen bytes are written into the buf buffer (including the
terminating null byte).
Macros
ESP_OK
esp_err_t value indicating success (no error)
ESP_FAIL
Generic esp_err_t code indicating failure
ESP_ERR_NO_MEM
Out of memory
ESP_ERR_INVALID_ARG
Invalid argument
ESP_ERR_INVALID_STATE
Invalid state
ESP_ERR_INVALID_SIZE
Invalid size
Espressif Systems
Error
Handling.
Error Code
Reference.
code)
code, char *buf, size_t buflen)
825
Submit Document Feedback
Release v4.4

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32-S2 and is the answer not in the manual?

Questions and answers

Table of Contents

Save PDF