diff options
author | Calvin Morrison <mutantturkey@gmail.com> | 2013-10-02 22:53:12 -0400 |
---|---|---|
committer | Calvin Morrison <mutantturkey@gmail.com> | 2013-10-02 22:53:12 -0400 |
commit | 90106ba794458787db91b8c85f5f8740831f14bd (patch) | |
tree | e8dec4dfba9e8535b87a29bf8f2c0755da27c84f | |
parent | 9e884daee643aaa6404910baa1a42832f38a8293 (diff) |
provide errno error details
-rw-r--r-- | kmer_frequency_per_sequence.c | 4 | ||||
-rw-r--r-- | kmer_total_count.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/kmer_frequency_per_sequence.c b/kmer_frequency_per_sequence.c index 9cda533..aa18dd6 100644 --- a/kmer_frequency_per_sequence.c +++ b/kmer_frequency_per_sequence.c @@ -1,7 +1,9 @@ // Copyright 2013 Calvin Morrison +#include <errno.h> #include <math.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "kmer_utils.h" @@ -22,7 +24,7 @@ int main(int argc, char **argv) { FILE *fh = fopen(argv[1], "r" ); if(fh == NULL) { - fprintf(stderr, "Couldn't open: %s\n", argv[1]); + fprintf(stderr, "Error opening %s - %s\n", argv[1], strerror(errno)); exit(EXIT_FAILURE); } diff --git a/kmer_total_count.c b/kmer_total_count.c index 0f44601..4fadf03 100644 --- a/kmer_total_count.c +++ b/kmer_total_count.c @@ -1,7 +1,9 @@ // Copyright 2013 Calvin Morrison +#include <errno.h> #include <math.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "kmer_utils.h" @@ -23,7 +25,7 @@ int main(int argc, char **argv) { FILE *fh = fopen(argv[1], "r"); if(fh == NULL) { - fprintf(stderr, "Couldn't open: %s\n", argv[1]); + fprintf(stderr, "Error opening %s - %s\n", argv[1], strerror(errno)); exit(EXIT_FAILURE); } |