diff --git a/java/src/org/broadinstitute/sting/gatk/datasources/reads/BAMSchedule.java b/java/src/org/broadinstitute/sting/gatk/datasources/reads/BAMSchedule.java index bc6089d1c..34693d501 100644 --- a/java/src/org/broadinstitute/sting/gatk/datasources/reads/BAMSchedule.java +++ b/java/src/org/broadinstitute/sting/gatk/datasources/reads/BAMSchedule.java @@ -31,6 +31,7 @@ import net.sf.samtools.GATKChunk; import net.sf.samtools.util.CloseableIterator; import org.broadinstitute.sting.utils.GenomeLoc; import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; +import org.broadinstitute.sting.utils.exceptions.UserException; import java.io.File; import java.io.IOException; @@ -267,7 +268,7 @@ public class BAMSchedule implements CloseableIterator { scheduleFileChannel = new RandomAccessFile(scheduleFile,"rw").getChannel(); } catch(IOException ex) { - throw new ReviewedStingException("Unable to create BAM schedule file.",ex); + throw new UserException("Unable to create a temporary BAM schedule file. Please make sure Java can write to the default temp directory or use -Djava.io.tmpdir= to instruct it to use a different temp directory instead.",ex); } scheduleFile.deleteOnExit();