Weirdly, PicardException inherits from SAMException, which means that our specialty code for

reporting malformed BAMs was actually misreporting any error that happened in the Picard layer
as a BAM ERROR.

Specifically changing PicardException to report as a ReviewedStingException; we might want to
change it in the future.  I'll followup with the Picard team to make sure they really, really
want PicardException to inherit from SAMException.
This commit is contained in:
Matt Hanna 2012-01-24 15:30:04 -05:00
parent 7c7ca0d799
commit c312bd5960
1 changed files with 7 additions and 1 deletions

View File

@ -25,6 +25,8 @@
package org.broadinstitute.sting.gatk;
import net.sf.picard.PicardException;
import net.sf.samtools.SAMException;
import org.broad.tribble.TribbleException;
import org.broadinstitute.sting.commandline.Argument;
import org.broadinstitute.sting.commandline.ArgumentCollection;
@ -95,7 +97,11 @@ public class CommandLineGATK extends CommandLineExecutable {
// We can generate Tribble Exceptions in weird places when e.g. VCF genotype fields are
// lazy loaded, so they aren't caught elsewhere and made into User Exceptions
exitSystemWithUserError(e);
} catch (net.sf.samtools.SAMException e) {
} catch(PicardException e) {
// TODO: Should Picard exceptions be, in general, UserExceptions or ReviewedStingExceptions?
exitSystemWithError(e);
}
catch (SAMException e) {
checkForTooManyOpenFilesProblem(e.getMessage());
exitSystemWithSamError(e);
} catch (Throwable t) {