Throw error message when tar file is selected#128
Open
albreverman wants to merge 1 commit intomasterfrom
Open
Conversation
tombrauer
reviewed
Feb 23, 2026
| } | ||
|
|
||
| if (path.endsWith(".tar")) { | ||
| throw new IllegalStateException("DataReader cannot parse non-SNODAS tar file"); |
Collaborator
There was a problem hiding this comment.
You're on the right track. I think that the end goal of this diff is to provide a more general and helpful message to the user, e.g. "An unrecognized tar file has been encountered. Try unarchiving the contents of the tar prior to import." Keep in mind that exception messages are usually targeted to developers. Let me know if you need any help connecting the dots to the end goal.
When a .tar, .tar.gz, or .zip file that is not a SNODAS dataset is used as input, DataReader now throws an UnrecognizedArchiveException instead of falling through to the NetCDF reader. The ImportMetWizard catches this exception and displays a user-friendly error message advising the user to extract the archive contents before import. Resolves: HMS-4582
490a097 to
b5cbc8f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Throw error message when non-SNODAS tar file is selected in the Importer utility.
Resolves: HMS-4582