Repository navigation
ESP32: New feature: EspError exception - #6638
Closed
IhorNehrutsa wants to merge 7 commits into
Closed
IhorNehrutsa wants to merge 7 commits into
IhorNehrutsa wants to merge 7 commits into
Conversation
IhorNehrutsa
commented
Nov 20, 2020
Comment on lines
+103
to
+117
| { 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) }, |
Contributor
Author
There was a problem hiding this comment.
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
Member
|
Thanks for the contribution, but I don't think this is the right approach. Mainly because it diverges from the standard approach of using |
tannewt
added a commit
to tannewt/circuitpython
that referenced
this pull request
Jul 25, 2022
Refine web workflow access control and http responses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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