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

Replace assertions by custom exceptions #39

Open
jorgepiloto opened this issue Aug 14, 2021 · 1 comment
Open

Replace assertions by custom exceptions #39

jorgepiloto opened this issue Aug 14, 2021 · 1 comment
Labels
enhancement New features or code improvements good first issue Easy to solve for newcomers
Milestone

Comments

@jorgepiloto
Copy link
Owner

jorgepiloto commented Aug 14, 2021

💻 Feature request: replace assertions by custom exceptions

In most of the solvers, different assertions regarding the validity of the parameters, the convergence to a given accuracy and others are executed. Assertions should only be applied within the tests/ directory. Instead, we must create custom exceptions and raise those, for example: IterationsError, AtolError, RevolutionsError, RtolError, InputError, TransferAngleError.

📝 References

This talks by Mario Corchero titled "Exceptional Exceptions" will be super useful!

  1. https://www.youtube.com/watch?v=f3UoZU3hK-c
  2. https://www.youtube.com/watch?v=V2fGAv2R5j8
@jorgepiloto jorgepiloto added enhancement New features or code improvements good first issue Easy to solve for newcomers labels Aug 14, 2021
@jorgepiloto jorgepiloto added this to the 0.3 milestone Aug 21, 2021
@jorgepiloto
Copy link
Owner Author

A color scheme needs to be defined for each one of those errors, so they can be tracked in the IterationsPlotter.

@jorgepiloto jorgepiloto pinned this issue Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features or code improvements good first issue Easy to solve for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant