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
This commit is contained in:
asivache 2009-05-29 15:56:55 +00:00
parent e0803eabd9
commit fe3b843b65
1 changed files with 3 additions and 0 deletions

View File

@ -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());
}
}
/**