From ae08d35138d94af135f7c24e2fcf68724194d0f9 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Wed, 18 Jul 2012 12:57:34 -0400 Subject: [PATCH] Catch 'too many open files' errors that show up when trying to read the bam index. All that needs to be done is to flesh out the original error message (because it will get caught later and rethrown correctly). --- .../sting/gatk/datasources/reads/GATKBAMIndex.java | 3 ++- .../sting/gatk/executive/HierarchicalMicroScheduler.java | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/datasources/reads/GATKBAMIndex.java b/public/java/src/org/broadinstitute/sting/gatk/datasources/reads/GATKBAMIndex.java index 2bf75b035..73301c511 100644 --- a/public/java/src/org/broadinstitute/sting/gatk/datasources/reads/GATKBAMIndex.java +++ b/public/java/src/org/broadinstitute/sting/gatk/datasources/reads/GATKBAMIndex.java @@ -24,6 +24,7 @@ package org.broadinstitute.sting.gatk.datasources.reads; import net.sf.samtools.*; +import org.broadinstitute.sting.gatk.CommandLineGATK; import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; import org.broadinstitute.sting.utils.exceptions.UserException; @@ -300,7 +301,7 @@ public class GATKBAMIndex { fileChannel = fileStream.getChannel(); } catch (IOException exc) { - throw new ReviewedStingException("Unable to open index file " + mFile, exc); + throw new ReviewedStingException("Unable to open index file (" + exc.getMessage() +")" + mFile, exc); } } diff --git a/public/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java b/public/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java index 79362ff2f..5f20ac7af 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java +++ b/public/java/src/org/broadinstitute/sting/gatk/executive/HierarchicalMicroScheduler.java @@ -11,7 +11,6 @@ import org.broadinstitute.sting.gatk.io.ThreadLocalOutputTracker; import org.broadinstitute.sting.gatk.walkers.TreeReducible; import org.broadinstitute.sting.gatk.walkers.Walker; import org.broadinstitute.sting.utils.exceptions.ReviewedStingException; -import org.broadinstitute.sting.utils.exceptions.StingException; import org.broadinstitute.sting.utils.threading.ThreadPoolMonitor; import java.util.Collection;