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

Throw exception if catscale can not be found #241

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

davidszkiba
Copy link
Contributor

If we lookup a catscale with a certain ID and there is none, raise an exception instead of returning null.

This prevents us from having to check if a catscale is null everytime we use the return_catscale_object() function.
Instead, the code that uses it can wrap the call within a try/catch block.
If we accidentally forget to do that, the exception message should make it easier to find the error.

@davidszkiba davidszkiba self-assigned this Jan 18, 2024
If we lookup a catscale with a certain ID and there is none, raise an
exception instead of returning null.
Copy link
Contributor

@eynimeni eynimeni left a comment

Choose a reason for hiding this comment

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

LGTM!

@davidszkiba davidszkiba merged commit ed360ab into develop Jan 18, 2024
32 checks passed
@davidszkiba davidszkiba deleted the dev-david-catscale-exception branch January 18, 2024 14:38
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