diff --git a/src/main/java/htsjdk/samtools/fastq/FastqReader.java b/src/main/java/htsjdk/samtools/fastq/FastqReader.java index d5d8f1889..76ead119d 100755 --- a/src/main/java/htsjdk/samtools/fastq/FastqReader.java +++ b/src/main/java/htsjdk/samtools/fastq/FastqReader.java @@ -136,7 +136,7 @@ private FastqRecord readNextRecord() { return frec ; } catch (IOException e) { - throw new SAMException(String.format("Error reading fastq '%s'", getAbsolutePath()), e); + throw new SAMException(error(e.getMessage()), e); } } @@ -177,7 +177,7 @@ public void close() { try { reader.close(); } catch (IOException e) { - throw new SAMException("IO problem in fastq file " + getAbsolutePath(), e); + throw new SAMException(error(e.getMessage()), e); } }