Skip to content
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

espidf.IDFError is used in contexts that are not ESP-specific #9148

Open
dhalbert opened this issue Apr 5, 2024 · 0 comments
Open

espidf.IDFError is used in contexts that are not ESP-specific #9148

dhalbert opened this issue Apr 5, 2024 · 0 comments
Labels
espressif applies to multiple Espressif chips proposal
Milestone

Comments

@dhalbert
Copy link
Collaborator

dhalbert commented Apr 5, 2024

espidf.IDFError is a subclass of OSError, which is a subclass of Exception. raise_esp_error() is a general routine that is used to check ESP-IDF error codes and raise espidf.IDFError with an appropriate message.

There are a number of non-ESP-specific contexts in which this error is raised, such as AnalogIn, neopixel_write, PulseOut, etc. where something like RuntimeError would be more appropriate, because the error is something that doesn't need to be designated as ESP-IDF-specific.

I am wondering whether we should change the type of the raised exception, or whether we might make IDFError be a subclass of RuntimeError instead, because many of the errors are not "OS"-related.

@dhalbert dhalbert added proposal espressif applies to multiple Espressif chips labels Apr 5, 2024
@tannewt tannewt added this to the Long term milestone Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
espressif applies to multiple Espressif chips proposal
Projects
None yet
Development

No branches or pull requests

2 participants