fix: harden C API boundary exception handling (issue #34)#35
Open
willwade wants to merge 4 commits into
Open
Conversation
- Add log_exception/log_error helpers for consistent exception handling - Replace fprintf(stderr, ...) with log callback in all parameter accessors - Add proper exception guards to setters that call broadcasting code - Standardize all catches to use the log callback instead of silent swallows - Update CONTRIBUTING.md Rule 4 with void function policy Fixes: - Setters (dasher_set_bool/long/string_parameter, dasher_set_speed_percent) now catch all exceptions and log via callback instead of propagating - Getters now catch all exceptions (not just bad_variant_access) and use log callback instead of fprintf, ensuring diagnostics reach frontends - dasher_set_screen_size Realize() failures now properly logged instead of silently discarded - Updated Rule 4 to explicitly document void function behavior: log via callback and return, never propagate Signed-off-by: will wade <willwade@gmail.com>
Signed-off-by: will wade <willwade@gmail.com>
…ion error The log_exception and log_error functions need to access members of dasher_ctx, so they must be defined after the struct is complete, not just after its forward declaration. Signed-off-by: will wade <willwade@gmail.com>
Signed-off-by: will wade <willwade@gmail.com>
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.
Issue #34