From a7cf9cdc67e14a9298e013df42beda06caba7595 Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Mon, 17 Oct 2011 15:25:35 -0400 Subject: [PATCH 1/4] Fixing error message typo --- .../sting/commandline/ArgumentTypeDescriptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java b/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java index 94157963f..14275c57b 100644 --- a/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java +++ b/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java @@ -380,7 +380,7 @@ class RodBindingArgumentTypeDescriptor extends ArgumentTypeDescriptor { if ( tribbleType == null ) if ( ! file.canRead() | ! file.isFile() ) { - throw new UserException.CouldNotReadInputFile(file, "file does exist or couldn't be read"); + throw new UserException.CouldNotReadInputFile(file, "file does't exist or couldn't be read"); } else { throw new UserException.CommandLineException( String.format("No tribble type was provided on the command line and the type of the file could not be determined dynamically. " + From ec911ce5bb8c3873dbfd0a0eb409aaed5d6a82a6 Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Mon, 17 Oct 2011 15:27:22 -0400 Subject: [PATCH 2/4] Even better error messages --- .../sting/commandline/ArgumentTypeDescriptor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java b/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java index 14275c57b..b54e7c7b1 100644 --- a/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java +++ b/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java @@ -379,8 +379,10 @@ class RodBindingArgumentTypeDescriptor extends ArgumentTypeDescriptor { } if ( tribbleType == null ) - if ( ! file.canRead() | ! file.isFile() ) { - throw new UserException.CouldNotReadInputFile(file, "file does't exist or couldn't be read"); + if ( ! file.exists() ) { + throw new UserException.CouldNotReadInputFile(file, "file does not exist"); + } else if ( ! file.canRead() | ! file.isFile() ) { + throw new UserException.CouldNotReadInputFile(file, "file could not be read"); } else { throw new UserException.CommandLineException( String.format("No tribble type was provided on the command line and the type of the file could not be determined dynamically. " + From c1329c4ddee4ce4330ff5046003d9e389f0c6f43 Mon Sep 17 00:00:00 2001 From: Mark DePristo Date: Mon, 17 Oct 2011 15:29:45 -0400 Subject: [PATCH 3/4] Fixing a binary to logical or --- .../sting/commandline/ArgumentTypeDescriptor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java b/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java index b54e7c7b1..d1d9cf7fe 100644 --- a/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java +++ b/public/java/src/org/broadinstitute/sting/commandline/ArgumentTypeDescriptor.java @@ -381,7 +381,7 @@ class RodBindingArgumentTypeDescriptor extends ArgumentTypeDescriptor { if ( tribbleType == null ) if ( ! file.exists() ) { throw new UserException.CouldNotReadInputFile(file, "file does not exist"); - } else if ( ! file.canRead() | ! file.isFile() ) { + } else if ( ! file.canRead() || ! file.isFile() ) { throw new UserException.CouldNotReadInputFile(file, "file could not be read"); } else { throw new UserException.CommandLineException(