fix: add error handling to TrackerStateMachine::init()#68
Closed
gdellis wants to merge 3 commits into
Closed
Conversation
Note in get_device_name() docstring that ESP_ERR_NVS_NOT_FOUND returns default name silently (intentional design). Closes #49
- Change init() return type from void to esp_err_t - Return error if Config::init() fails - Handle error in main.cpp by logging (state machine still continues in degraded mode) The state machine holds references to components, so init failures don't prevent the machine from running - we log and continue in ERROR state if critical (Config) fails. Closes #58
Owner
Author
|
This PR adds error handling to TrackerStateMachine::init() (issue #58). The changes have already been merged into main via other PRs that were merged earlier. Closing as duplicate. |
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.
Summary
Change
init()return type fromvoidtoesp_err_tto signal success/failure.Changes
state_machine.hpp: Changevoid init()toesp_err_t init()state_machine.cpp: Return error ifConfig::init()fails, otherwiseESP_OKmain.cpp: Handle returned error fromstate_machine.init()Closes #58