From fe3b843b657cf6f3f29f77a95abdd247477a32bc Mon Sep 17 00:00:00 2001 From: asivache Date: Fri, 29 May 2009 15:56:55 +0000 Subject: [PATCH] intercept NullPointerException and rethrow it with (marginally) comprehensible error message when an attempt to get class source code location fails git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@854 348d0f76-0448-11de-a6fe-93d51630548a --- java/src/org/broadinstitute/sting/utils/JVMUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/src/org/broadinstitute/sting/utils/JVMUtils.java b/java/src/org/broadinstitute/sting/utils/JVMUtils.java index 1033e1143..142deddaf 100755 --- a/java/src/org/broadinstitute/sting/utils/JVMUtils.java +++ b/java/src/org/broadinstitute/sting/utils/JVMUtils.java @@ -40,6 +40,9 @@ public class JVMUtils { // a URISyntaxException here must be an IO error; wrap as such. throw new IOException(ex); } + catch ( NullPointerException ne ) { + throw new IOException("Can not extract code source location for "+clazz.getName()); + } } /**