Handle no class def errors
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Fri, 9 Jun 2017 10:55:29 +0000 (13:55 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Fri, 9 Jun 2017 10:55:29 +0000 (13:55 +0300)
src/main/java/eu/svjatoslav/inspector/java/structure/ClassDescriptor.java

index 3bd1049..13d87b8 100755 (executable)
@@ -73,8 +73,13 @@ public class ClassDescriptor implements GraphElement, Comparable<ClassDescriptor
         if (!isVisible())
             return;
 
-        indexFields(clazz.getDeclaredFields());
-        indexFields(clazz.getFields());
+        try {
+            indexFields(clazz.getDeclaredFields());
+            indexFields(clazz.getFields());
+        } catch (NoClassDefFoundError error){
+            // TODO: better logging of this error
+            System.out.println(error.toString());
+        }
 
         indexMethods(clazz);