From fa77a83783a3c37b2975cbaefa495f3ec081a200 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Fri, 12 Oct 2012 09:38:12 -0400 Subject: [PATCH] Update the out of space error to include another permutation --- .../src/org/broadinstitute/sting/gatk/CommandLineGATK.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java b/public/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java index 1b41b85f4..0daad2c2b 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java +++ b/public/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java @@ -114,6 +114,9 @@ public class CommandLineGATK extends CommandLineExecutable { public static final String PICARD_TEXT_SAM_FILE_ERROR_1 = "Cannot use index file with textual SAM file"; public static final String PICARD_TEXT_SAM_FILE_ERROR_2 = "Cannot retrieve file pointers within SAM text files"; + public static final String NO_SPACE_LEFT_ON_DEVICE_ERROR = "No space left on device"; + public static final String DISK_QUOTA_EXCEEDED_ERROR = "Disk quota exceeded"; + private static void checkForMaskedUserErrors(final Throwable t) { final String message = t.getMessage(); if ( message == null ) @@ -133,9 +136,9 @@ public class CommandLineGATK extends CommandLineExecutable { exitSystemWithUserError(new UserException(t.getCause() == null ? message : t.getCause().getMessage())); // disk is full - if ( message.contains("No space left on device") ) + if ( message.contains(NO_SPACE_LEFT_ON_DEVICE_ERROR) || message.contains(DISK_QUOTA_EXCEEDED_ERROR) ) exitSystemWithUserError(new UserException.NoSpaceOnDevice()); - if ( t.getCause() != null && t.getCause().getMessage().contains("No space left on device") ) + if ( t.getCause() != null && (t.getCause().getMessage().contains(NO_SPACE_LEFT_ON_DEVICE_ERROR) || t.getCause().getMessage().contains(DISK_QUOTA_EXCEEDED_ERROR)) ) exitSystemWithUserError(new UserException.NoSpaceOnDevice()); // masked out of memory error