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

Do not use exceptions as a result pattern #100

Open
y9san9 opened this issue Mar 21, 2024 · 0 comments
Open

Do not use exceptions as a result pattern #100

y9san9 opened this issue Mar 21, 2024 · 0 comments

Comments

@y9san9
Copy link
Member

y9san9 commented Mar 21, 2024

Now lots of methods are made in the way where you must check for exceptions in order to everything work fine. It's not a big deal though since you always try-catch your code using SDK because it can fail at any moment due to network conditions. However, using exceptions as a result doesn't give a clear contract of the method when looking at signature. Who will think when using users.edit to check whether username were occupied or not? If we make this with sealed, hopefully, this will be more clear and obvious.

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

No branches or pull requests

1 participant