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

Demote FitsException to a runtime exception #519

Merged
merged 10 commits into from Dec 14, 2023

Conversation

attipaci
Copy link
Collaborator

@attipaci attipaci commented Dec 13, 2023

Since the inception of this library FitsException was a hard exception that forced programmers to deal with it. However, its meaning is much more similar conceptually to Java's IllegalStateException -- which is a soft runtime exception. Therefore, let's change FitsException (and its derivatives such as HeaderCardExcepton) to be a FITS-specific subclass of IllegalStateException going forward.

The change is entirely backward compatible from a developer's point of view. The catch blocks that were necessary before still work the same, only they are now optional.

As a result of the change the internal nom.fits.compression.provider.param.api.IHeaderAccess interface, its subclasses and usage have become obsoleted and unnecessary. These have been marked as deprecated to be removed in a future release (such as 2.0).

Some further tweaks in PR #530

@attipaci attipaci added the enhancement A new feature and/or an improved capability label Dec 13, 2023
@attipaci attipaci added this to the 1.19.0 milestone Dec 13, 2023
@attipaci attipaci self-assigned this Dec 13, 2023
Copy link

codecov bot commented Dec 13, 2023

Codecov Report

Merging #519 (292ba74) into master (d47b28e) will increase coverage by 0.04%.
Report is 7 commits behind head on master.
The diff coverage is 98.33%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #519      +/-   ##
============================================
+ Coverage     97.65%   97.69%   +0.04%     
- Complexity     4779     4790      +11     
============================================
  Files           207      209       +2     
  Lines         13796    13781      -15     
  Branches       2122     2123       +1     
============================================
- Hits          13472    13463       -9     
+ Misses          122      117       -5     
+ Partials        202      201       -1     
Flag Coverage Δ
unittests 97.69% <98.33%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/main/java/nom/tam/fits/BasicHDU.java 97.84% <ø> (ø)
src/main/java/nom/tam/fits/BinaryTable.java 96.88% <100.00%> (+0.24%) ⬆️
src/main/java/nom/tam/fits/Data.java 95.23% <ø> (ø)
src/main/java/nom/tam/fits/FitsException.java 100.00% <ø> (ø)
src/main/java/nom/tam/fits/Header.java 96.94% <100.00%> (+0.15%) ⬆️
...java/nom/tam/fits/HierarchNotEnabledException.java 100.00% <ø> (ø)
src/main/java/nom/tam/fits/ImageData.java 97.45% <100.00%> (-0.07%) ⬇️
...a/nom/tam/fits/LongStringsNotEnabledException.java 100.00% <ø> (ø)
src/main/java/nom/tam/fits/LongValueException.java 100.00% <ø> (ø)
src/main/java/nom/tam/fits/NullData.java 93.33% <100.00%> (+5.09%) ⬆️
... and 22 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d47b28e...292ba74. Read the comment docs.

@attipaci attipaci merged commit 26e7978 into nom-tam-fits:master Dec 14, 2023
4 checks passed
@attipaci attipaci deleted the demote-fitsexception branch December 14, 2023 09:18
attipaci added a commit that referenced this pull request Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature and/or an improved capability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant