Add file name to FileTruncatedException message #747

Closed
ronlevine opened this Issue Nov 21, 2016 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

ronlevine commented Nov 21, 2016 edited

Verify

Look at broadinstitute/gsa-unstable#1427.
For HTSJDK, create a test that that catches the FileTruncatedException from reading a truncated vcf.gz file and verify the exception message is Premature end of file. testBasicWriteAndRead is a good starting point for creating a test.

Subject of the issue

Reading a truncated vcf.gz file needs a more informative error message.
Refer to broadinstitute/gsa-unstable#1427.

Your environment

  • version of htsjdk - 2.6.1
  • version of java - 1.8.0_66
  • which OS - mac OS 10.12.1 (16B2555)

Steps to reproduce

Tell us how to reproduce this issue. If possible, include a short code snippet to demonstrate the problem.

Expected behaviour

Exception message:Premature end of FILENAME. where FILENAME is the name of the truncated file.

Actual behaviour

Exception message:Premature end of file.

ronlevine self-assigned this Nov 21, 2016

ronlevine referenced this issue Nov 22, 2016

Merged

Add file name to exception messages #750

3 of 5 tasks complete
Contributor

ronlevine commented Nov 23, 2016

Closing since #750 is merged.

ronlevine closed this Nov 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment