-
Notifications
You must be signed in to change notification settings - Fork 596
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
Added new catch block for character encoding error cases. #5124
Added new catch block for character encoding error cases. #5124
Conversation
Added a new catch block in `PathLineIterator` for character encoding errors, along with a new error message to be given to the user for such cases. Added unit test for malformed xsv locatable files. Fixes #4006
Codecov Report
@@ Coverage Diff @@
## master #5124 +/- ##
=============================================
+ Coverage 86.66% 86.66% +<.001%
- Complexity 29043 29048 +5
=============================================
Files 1808 1808
Lines 134662 134686 +24
Branches 14935 14938 +3
=============================================
+ Hits 116698 116719 +21
Misses 12552 12552
- Partials 5412 5415 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, if I understand correctly, @jonn-smith , this is simply if there is a character encoding issue in the config file for an xsv locatable datasource/funcotationfactory?
If so, that is fine. Minor comment(s)... feel free to merge after addressed.
@@ -30,10 +32,14 @@ | |||
* @param path path to a text file. | |||
* @throws UserException if we cannot open the file for reading. | |||
*/ | |||
public PathLineIterator(Path path) throws UserException { | |||
public PathLineIterator(final Path path) throws UserException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need throws UserException
, since that is a runtime exception?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not. I'll pull it out.
That's correct. I ran into a character encoding issue with a test file at one point. This will make the errors a little more explanatory. |
Added a new catch block in
PathLineIterator
for character encodingerrors, along with a new error message to be given to the user for such
cases.
Added unit test for malformed xsv locatable files.
Fixes #4006