From 41a8a304a0ffc2b6a6209b8da6b4423d8c91bd22 Mon Sep 17 00:00:00 2001 From: Eric Banks Date: Fri, 7 Sep 2012 11:27:00 -0400 Subject: [PATCH] Catch masked OutOfMemory errors as User Errors --- .../src/org/broadinstitute/sting/gatk/CommandLineGATK.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java b/public/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java index ce57d1a7a..1b41b85f4 100755 --- a/public/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java +++ b/public/java/src/org/broadinstitute/sting/gatk/CommandLineGATK.java @@ -137,6 +137,10 @@ public class CommandLineGATK extends CommandLineExecutable { exitSystemWithUserError(new UserException.NoSpaceOnDevice()); if ( t.getCause() != null && t.getCause().getMessage().contains("No space left on device") ) exitSystemWithUserError(new UserException.NoSpaceOnDevice()); + + // masked out of memory error + if ( t.getCause() != null && t.getCause() instanceof OutOfMemoryError ) + exitSystemWithUserError(new UserException.NotEnoughMemory()); } /**