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

Remove error from constructor if never a error happens #101

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

majst01
Copy link
Contributor

@majst01 majst01 commented Jun 13, 2024

During inspection of the code for the requirement of #100 i identified:

  • the server will not start if the database is not working
  • every service constructor has a error signature which will never return an error.

This means that consumers will always get a working service, therefor #100 can be closed, and we can simplify the whole service creation logic by removing the error in the constructor signature.

@majst01 majst01 requested a review from a team as a code owner June 13, 2024 06:24
@majst01 majst01 force-pushed the constructors-without-errors branch from f778b5e to b3e3a1f Compare June 13, 2024 06:26
@majst01 majst01 changed the title Remove error from constructor if never error occurs Remove error from constructor if never a error happens Jun 13, 2024
@majst01 majst01 requested review from vknabel and Gerrit91 June 13, 2024 06:29
Copy link

@vknabel vknabel left a comment

Choose a reason for hiding this comment

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

Nice, good catch!

@majst01 majst01 merged commit 002061c into master Jun 13, 2024
1 check passed
@majst01 majst01 deleted the constructors-without-errors branch June 13, 2024 06:32
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