Skip to content

Refactor print_to_console #45

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

Merged
merged 2 commits into from
Feb 27, 2023

Conversation

lonesometraveler
Copy link
Contributor

This fixes #40

Looking at the app's current design, I figured printing out the error message within the print_to_console function may be appropriate. This makes the code simple and straightforward.

In the future, if we want the caller to take some action based on the error, it may be more appropriate to return a Result<(), std::sync::PoisonError<std::sync::RwLockWriteGuard<Vec<Print>>>> and let the caller handle the error.

@hacknus hacknus merged commit ff002ee into hacknus:main Feb 27, 2023
@lonesometraveler lonesometraveler deleted the refactor_print_to_console branch March 17, 2023 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error handling in print_to_console and update_in_console functions
2 participants