Skip to content

Commit 1987eb0

Browse files
authored
BUG: improve error message formatting in feature-table tabulate-seqs (#300)
1 parent a9e47ba commit 1987eb0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

q2_feature_table/_summarize/_visualizer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def tabulate_seqs(output_dir: str, data: DNAIterator,
5959
metadata_df.index)
6060
elif merge_method == 'strict':
6161
if set(metadata_df.index) != display_sequences:
62-
raise Exception('Merge method is strict and IDs do not match')
62+
raise ValueError('Merge method is strict and IDs do not match')
6363
if taxonomy is not None:
6464
for member in taxonomy.values():
6565
if merge_method == 'union':
@@ -69,8 +69,8 @@ def tabulate_seqs(output_dir: str, data: DNAIterator,
6969
member.index)
7070
elif merge_method == 'strict':
7171
if set(member.index) != display_sequences:
72-
raise Exception('Merge method is strict and IDs do not \
73-
match')
72+
raise ValueError(
73+
'Merge method is strict and IDs do not match')
7474

7575
seq_len_stats = _compute_descriptive_stats(seq_lengths)
7676
_write_tsvs_of_descriptive_stats(seq_len_stats, output_dir)

0 commit comments

Comments
 (0)