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

Use Maybe or ErrorOr monad for return parameters for methods TypeFor, ChangeType, etc #578

Open
baseTwo opened this issue Sep 26, 2024 · 0 comments
Labels
refactor Structural code changes without changing functionality

Comments

@baseTwo
Copy link
Collaborator

baseTwo commented Sep 26, 2024

A lot of methods in the code base change behavior based on a throwError parameter, either returning a valid value, or null/throw exception based on that parameter.

Replace these return types with an ErrorOr result, which allows the caller to check if there was an error or valid value and take the appropriate action based on that.

@baseTwo baseTwo added the refactor Structural code changes without changing functionality label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Structural code changes without changing functionality
Projects
None yet
Development

No branches or pull requests

1 participant