We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Convolution raises bare Exceptions!
astropy/astropy/convolution/core.py
Lines 379 to 381 in 8381f30
Have meaningful errors. Maybe whip up a quick
class KernelException(Exception): """An exception for kernel convolution."""
Bare Excepts are a classic anti pattern.
Noticed by Ruff in #14724
The text was updated successfully, but these errors were encountered:
We should do a followup to update the tests from pytest.raises(Exception) to pytest.raises(KernelArithmeticError)
pytest.raises(Exception)
pytest.raises(KernelArithmeticError)
Also, maybe all the Kernel error classes should have a common base class? Like KernelError
Sorry, something went wrong.
@nstarman I'm working on a PR to clean up various convolution exceptions. I'll also update the tests from #14724.
convolution
Successfully merging a pull request may close this issue.
What is the problem this feature will solve?
Convolution raises bare Exceptions!
astropy/astropy/convolution/core.py
Lines 379 to 381 in 8381f30
Describe the desired outcome
Have meaningful errors.
Maybe whip up a quick
Bare Excepts are a classic anti pattern.
Additional context
Noticed by Ruff in #14724
The text was updated successfully, but these errors were encountered: