Skip to content
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

Share more code between the warn() and fail() branches #49

Conversation

AlexWaygood
Copy link

What do you think of this idea? I'm not a massive fan at the moment of how the code in main() for dealing with ClinicError exceptions basically duplicates the code in warn_and_fail() for constructing warning messages. By putting that code in a method on the ClinicError class, we can unify the two branches:

Copy link
Owner

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@erlend-aasland erlend-aasland merged commit 7766c3d into erlend-aasland:clinic/warn-and-fail Aug 2, 2023
3 checks passed
@AlexWaygood AlexWaygood deleted the unify-warn-and-fail branch August 2, 2023 16:07
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.

2 participants