Replies: 2 comments 4 replies
-
One way that we could think of this is a distinction between what users of the crate can control and what they can't. Or, in other words, given a certain error situation. Is there something users can change to troubleshoot the error? Discrepancies in firmware versions on the WIFI module can be corrected. Whether or not the correct NINA firmware command is invoked is entirely up to the authors of this crate to correct. We don't expose access to that control. So maybe we can reconsider the concept of protocol level errors as they are not actionable by users. |
Beta Was this translation helpful? Give feedback.
-
I added a |
Beta Was this translation helpful? Give feedback.
-
The purpose of this thread is to discuss and decide on a preferred approach to error handling from deep within the crate that allows for different classes of errors to be passed and mapped upward to the highest level API (i.e. the
Wifi
struct and the highest level error type, Error).Right now we've had a single kind of error called ProtocolError that's used in spi.rs.
In adding a new error to signify that doing a DNS query has failed, we realized that it may be time to allow for inner errors to be different types instead of mixing seemingly unrelated ones in the same enum.
Please share any and all constructive ideas.
Beta Was this translation helpful? Give feedback.
All reactions