-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
ESP32: New feature: EspError exception #6638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_INVALID_ARG), MP_ROM_INT(ESP_ERR_INVALID_ARG) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_INVALID_CRC), MP_ROM_INT(ESP_ERR_INVALID_CRC) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_INVALID_MAC), MP_ROM_INT(ESP_ERR_INVALID_MAC) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_INVALID_RESPONSE), MP_ROM_INT(ESP_ERR_INVALID_RESPONSE) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_INVALID_SIZE), MP_ROM_INT(ESP_ERR_INVALID_SIZE) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_INVALID_STATE), MP_ROM_INT(ESP_ERR_INVALID_STATE) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_INVALID_VERSION), MP_ROM_INT(ESP_ERR_INVALID_VERSION) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_MESH_BASE), MP_ROM_INT(ESP_ERR_MESH_BASE) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_NOT_FOUND), MP_ROM_INT(ESP_ERR_NOT_FOUND) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_NOT_SUPPORTED), MP_ROM_INT(ESP_ERR_NOT_SUPPORTED) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_NO_MEM), MP_ROM_INT(ESP_ERR_NO_MEM) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_TIMEOUT), MP_ROM_INT(ESP_ERR_TIMEOUT) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_ERR_WIFI_BASE), MP_ROM_INT(ESP_ERR_WIFI_BASE) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_FAIL), MP_ROM_INT(ESP_FAIL) }, | ||
{ MP_ROM_QSTR(MP_QSTR_ESP_OK), MP_ROM_INT(ESP_OK) }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if all(or part) ESP-IDF codes should be pulled(Q-stringed) as constants into MicroPython.
The complete list is very long and not in the "micro" paradigm.
Error Codes Reference
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/error-codes.html
Thanks for the contribution, but I don't think this is the right approach. Mainly because it diverges from the standard approach of using |
Refine web workflow access control and http responses
EspError exception handles native ESP-IDF error codes.
It designed to use in ESP32 port C code to catch ESP-IDF functions error codes like
See Error Codes and Helper Functions
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/esp_err.html
Wrapped around
https://github.com/espressif/esp-idf/blob/master/components/esp_common/include/esp_err.h
Test is
output is
This PR overwrite the first part of PR #6626