JAL-3066 debug info: check response when adding features and annotation
authorJim Procter <jprocter@issues.jalview.org>
Mon, 7 Oct 2019 08:08:10 +0000 (09:08 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 7 Oct 2019 08:08:10 +0000 (09:08 +0100)
src/jalview/ws/slivkaws/SlivkaAnnotationServiceInstance.java

index 7ec7e6e..3a5899b 100644 (file)
@@ -1,6 +1,7 @@
 package jalview.ws.slivkaws;
 
 import jalview.api.FeatureColourI;
+import jalview.bin.Cache;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.SequenceI;
@@ -117,10 +118,17 @@ public class SlivkaAnnotationServiceInstance extends SlivkaWSInstance implements
     }
     Alignment aln = new Alignment(seqs.toArray(new SequenceI[0]));
     BufferedReader readerIn = new BufferedReader(new InputStreamReader(annotFile.getContent()));
-    new AnnotationFile().parseAnnotationFrom(aln, null, readerIn);
+    if (!new AnnotationFile().parseAnnotationFrom(aln, null, readerIn))
+    {
+      Cache.log.debug("No annotation from slivka job\n" + annotFile);
+    }
     if (featFile != null)
     {
-      new FeaturesFile(featFile.getURL().toString(), DataSourceType.URL).parse(aln, featureColours, true);
+      if (!new FeaturesFile(featFile.getURL().toString(),
+              DataSourceType.URL).parse(aln, featureColours, true))
+      {
+        Cache.log.debug("No features from slivka job\n" + featFile);
+      }
     }
     return Arrays.asList(aln.getAlignmentAnnotation());
   }