Skip to content

Commit

Permalink
Printing accepted types when invalid type is given
Browse files Browse the repository at this point in the history
I can never remember, whether snps is in plural or not. And I can never remember, whether other is named "other" or "complex" or something third. With this pull request the error message is slightly more informative.
  • Loading branch information
Tommy Carstensen committed Feb 10, 2015
1 parent 1fedb8b commit 53303df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vcfview.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ static void init_data(args_t *args)
else if (strcmp(type_list[i], "other") == 0) args->include |= VCF_OTHER;
else {
fprintf(stderr, "[E::%s] unknown type\n", type_list[i]);
fprintf(stderr, "Accepted types are snps, indels, mnps, other\n", type_list[i]);
exit(1);
}
}
Expand All @@ -198,6 +199,7 @@ static void init_data(args_t *args)
else if (strcmp(type_list[i], "other") == 0) args->exclude |= VCF_OTHER;
else {
fprintf(stderr, "[E::%s] unknown type\n", type_list[i]);
fprintf(stderr, "Accepted types are snps, indels, mnps, other\n", type_list[i]);
exit(1);
}
}
Expand Down

0 comments on commit 53303df

Please sign in to comment.