JAL-3032 don't throw Exception to signal chain not found, return null
[jalview.git] / src / jalview / io / StructureFile.java
index 16ae0a1..084f886 100644 (file)
@@ -341,8 +341,15 @@ public abstract class StructureFile extends AlignFile
     }
     StructureImportSettings.setShowSeqFeatures(true);
   }
-
-  public PDBChain findChain(String id) throws Exception
+  
+  /**
+   * Answers the first PDBChain found matching the given id, or null if none 
+   * is found
+   * 
+   * @param id
+   * @return
+   */
+  public PDBChain findChain(String id)
   {
     for (PDBChain chain : getChains())
     {
@@ -351,7 +358,7 @@ public abstract class StructureFile extends AlignFile
         return chain;
       }
     }
-    throw new Exception("PDB chain not Found!");
+    return null;
   }
 
   public void makeResidueList()