Minor cleanup

This commit is contained in:
Eric Banks 2012-03-21 12:14:31 -04:00
parent ab1c48745b
commit dcf2fa361d
1 changed files with 2 additions and 4 deletions

View File

@ -1,12 +1,10 @@
package org.broadinstitute.sting.gatk.iterators;
import net.sf.samtools.SAMFormatException;
import net.sf.samtools.SAMRecord;
import net.sf.samtools.util.CloseableIterator;
import org.broadinstitute.sting.utils.exceptions.UserException;
import java.io.File;
import java.io.IOException;
import java.util.Iterator;
/**
@ -24,7 +22,7 @@ public class MalformedBAMErrorReformatingIterator implements CloseableIterator<S
public boolean hasNext() {
try {
return this.it.hasNext();
} catch ( RuntimeException e ) { // we need to catch RuntimeExceptions here because the Picard code is throwing them (among SAMFileExceptions) sometimes
} catch ( RuntimeException e ) { // we need to catch RuntimeExceptions here because the Picard code is throwing them (among SAMFormatExceptions) sometimes
throw new UserException.MalformedBAM(source, e.getMessage());
}
}
@ -32,7 +30,7 @@ public class MalformedBAMErrorReformatingIterator implements CloseableIterator<S
public SAMRecord next() {
try {
return it.next();
} catch ( RuntimeException e ) { // we need to catch RuntimeExceptions here because the Picard code is throwing them (among SAMFileExceptions) sometimes
} catch ( RuntimeException e ) { // we need to catch RuntimeExceptions here because the Picard code is throwing them (among SAMFormatExceptions) sometimes
throw new UserException.MalformedBAM(source, e.getMessage());
}
}