From 3cad580655a7d4423f61504910ee457fd49db54f Mon Sep 17 00:00:00 2001 From: hanna Date: Wed, 20 May 2009 19:17:16 +0000 Subject: [PATCH] Catch and rethrow the walker's required argument, so that command-line arguments will be displayed when the GATK throws an argument exception. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@765 348d0f76-0448-11de-a6fe-93d51630548a --- .../org/broadinstitute/sting/gatk/CommandLineGATK.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java b/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java index 5d39465ee..20fbeb59a 100755 --- a/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java +++ b/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java @@ -7,6 +7,7 @@ import org.broadinstitute.sting.utils.xReadLines; import org.broadinstitute.sting.utils.cmdLine.Argument; import org.broadinstitute.sting.utils.cmdLine.ArgumentCollection; import org.broadinstitute.sting.utils.cmdLine.CommandLineProgram; +import org.broadinstitute.sting.utils.cmdLine.ArgumentException; import java.io.FileNotFoundException; import java.io.File; @@ -93,7 +94,12 @@ public class CommandLineGATK extends CommandLineProgram { this.argCollection.analysisName = this.analysisName; try { GATKEngine = new GenomeAnalysisEngine(argCollection, mWalker); - } catch (StingException exp) { + } + catch (ArgumentException ex) { + // Rethrow argument exceptions. Let the command-line argument do what it's designed to do. + throw ex; + } + catch (StingException exp) { System.err.println("Caught StingException. It's message is " + exp.getMessage()); exp.printStackTrace(); return -1;