Skip to content

Commit

Permalink
improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaenick committed May 12, 2023
1 parent 2b8d9b8 commit 825ab10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bamstats.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ int bam_reader(char* bamfile, char* outfile) {
char* ref = hdr->target_name[tid];
k = kh_get(str, h, ref);
if (k == kh_end(h)) { // miss
fprintf(stderr, "error\n");
fprintf(stderr, "error for reference sequence %s\n", ref);
return -1;
} else {
cnt = kh_val(h, k);
kh_value(h, k) = ++cnt;
Expand Down

0 comments on commit 825ab10

Please sign in to comment.