You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Out of curiosity: what kind of change do you have in mind?
From my perspective, the best option would be an exception.
+ Simple to detect problem, easy to handle "globally".
- But there can not be any exceptions on Arduino :/
Second option is to make replace return bool to signal if it was successful.
+ Clear interface
- Could be a little bit backwards incompatible (interface change), but since it returns void now, probably nobody really "checks" what it returns RN, so for the new code anybody can just start checking.
- Check and and handle each and every time it is used might be cumbersome
Another way is to add a third parameter to replace: a reference bool to check if succeeded
+ more BC than above
- even more cumbersome than above (having to create a var in advance on usage)
Log info to serial
- You have to be lucky to observe serial monitor and notice
+ But actually that's the first thing I do when there is a problem: log to serial everything I suspect might be connected to the issue -> so it would have helped me to spot the problem much faster
Any other ideas?
EDIT: OK, NVM, I just noticed the issue's title xD So, it will be option 4. Alright, a compromise it is ;-)
Following this comment
Change would be there
Cc: @MacDada
The text was updated successfully, but these errors were encountered: