Make Geraldine's life easier: from now on we treat problems where a temp file cannot be found when running the GATK with multiple threads as User Errors (since they are 99.9% of the time). This is an extremely large class of errors in Tableau and on the forums. Helpful error message tells users exactly what we tell them on the forums anyways (Geraldine: feel free to edit).

This commit is contained in:
Eric Banks 2012-10-12 09:19:50 -04:00
parent ad60300bee
commit 85525d9e6e
2 changed files with 7 additions and 1 deletions

View File

@ -186,7 +186,7 @@ public class VariantContextWriterStorage implements Storage<VariantContextWriter
// that way we don't assume it's a specific type
final FeatureManager.FeatureDescriptor fd = new FeatureManager().getByFiletype(file);
if ( fd == null )
throw new ReviewedStingException("Unexpectedly couldn't find valid codec for temporary output file " + file);
throw new UserException.LocalParallelizationProblem(file);
final FeatureCodec<VariantContext> codec = fd.getCodec();
final AbstractFeatureReader<VariantContext> source =

View File

@ -129,6 +129,12 @@ public class UserException extends ReviewedStingException {
}
}
public static class LocalParallelizationProblem extends UserException {
public LocalParallelizationProblem(final File file) {
super(String.format("There was a failure because temporary file %s could not be found while running the GATK with more than one thread. Possible causes for this problem include: your system's open file handle limit is too small, your output or temp directories do not have sufficient space, or just an isolated file system blip", file.getAbsolutePath()));
}
}
public static class NotEnoughMemory extends UserException {
public NotEnoughMemory() {
super(String.format("There was a failure because you did not provide enough memory to run this program. See the -Xmx JVM argument to adjust the maximum heap size provided to Java"));