Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Index.writeBasedOnFeaturePath should throw instead of silently Failing #841
Conversation
|
Here you have a patch that should be tested against picard/gatk, @lbergelson. Silently failing is not nice... |
codecov-io
commented
Apr 4, 2017
•
Codecov Report
@@ Coverage Diff @@
## master #841 +/- ##
===============================================
+ Coverage 64.939% 64.953% +0.014%
- Complexity 7210 7211 +1
===============================================
Files 527 527
Lines 31802 31800 -2
Branches 5426 5426
===============================================
+ Hits 20652 20655 +3
+ Misses 9017 9013 -4
+ Partials 2133 2132 -1
|
| @@ -230,8 +228,7 @@ public void write(final Path tabixPath) throws IOException { | ||
| @Override | ||
| public void writeBasedOnFeaturePath(final Path featurePath) throws IOException { |
droazen
Apr 18, 2017
•
Contributor
Can you update the javadoc for this method (and overloads) in the Index interface to mention that this method now throws an IOException in the case where featurePath is not a regular file?
| @@ -230,8 +228,7 @@ public void write(final Path tabixPath) throws IOException { | ||
| @Override | ||
| public void writeBasedOnFeaturePath(final Path featurePath) throws IOException { | ||
| if (!Files.isRegularFile(featurePath)) { | ||
| - LOGGER.warn("Index not written into ", featurePath); | ||
| - return; | ||
| + throw new IOException("Cannot write based on a non-regular file: " + featurePath.toUri()); |
droazen
Apr 18, 2017
•
Contributor
Can you add a test case showing that the new exception is thrown in the non-regular file case?
|
Two comments, back to @magicDGS for changes |
magicDGS
was assigned
by droazen
Apr 18, 2017
magicDGS
added some commits
Apr 4, 2017
|
I've addressed the comments - back to you @droazen. Thanks for reviewing! |
lbergelson
assigned yfarjoun and unassigned magicDGS
May 16, 2017
|
not entirely sure what's going on, but when I build picard with this htsjdk I get the following error:
|
|
looks like the problem goes away with a rebase onto htsjdk/master, so nevermind. |
|
|
lbergelson
merged commit cc8a1a1
into
samtools:master
May 27, 2017
magicDGS
deleted the
magicDGS:dgs_issue_821 branch
May 28, 2017
|
Thnaks! And sorry for the inconvenience of the rebasing issue! |
magicDGS commentedApr 4, 2017
•
edited
Description
Solves #821
Checklist