X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fio%2FStructureFile.java;h=084f8869e5a85e6468bdef9ec61574ef8e7db6fc;hb=c2ab85e25d124ad2dc0a6961cd2c5325c27bfa75;hp=16ae0a1b4eb3f2bd52d8347633b9e48808ea7f2e;hpb=b879c4a2d32d3489e63ac06917e81637e6bb4068;p=jalview.git diff --git a/src/jalview/io/StructureFile.java b/src/jalview/io/StructureFile.java index 16ae0a1..084f886 100644 --- a/src/jalview/io/StructureFile.java +++ b/src/jalview/io/StructureFile.java @@ -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()