File tree Expand file tree Collapse file tree
biojava-core/src/main/java/org/biojava/nbio/core/sequence Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -257,11 +257,11 @@ public ExonSequence removeExon(String accession) {
257257 * @param begin
258258 * @param end
259259 * @return exon sequence
260+ * @throws IllegalArgumentException if accessionID is already added.
260261 */
261- public ExonSequence addExon (AccessionID accession , int begin , int end ) throws Exception {
262- // TODO should be IllegalArgumentException, is more specific
262+ public ExonSequence addExon (AccessionID accession , int begin , int end ) {
263263 if (exonSequenceHashMap .containsKey (accession .getID ())) {
264- throw new Exception ("Duplicate accesion id " + accession .getID ());
264+ throw new IllegalArgumentException ("Duplicate accesion id " + accession .getID ());
265265 }
266266
267267 ExonSequence exonSequence = new ExonSequence (this , begin , end ); //sense should be the same as parent
You can’t perform that action at this time.
0 commit comments