Skip to content

Commit 1eaa00b

Browse files
committed
turn exception to IAE
1 parent 794de2c commit 1eaa00b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

biojava-core/src/main/java/org/biojava/nbio/core/sequence/GeneSequence.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)