diff options
author | Daniel Santos <dacs.git@brilhante.top> | 2022-03-13 14:28:09 +0000 |
---|---|---|
committer | Daniel Santos <dacs.git@brilhante.top> | 2022-03-13 14:28:09 +0000 |
commit | 428eecbdcb68543adacf8d091f6c0793db91d61e (patch) | |
tree | 13874f867a3e65bdab1046602b5bd8ded747f564 | |
parent | f44be5f3b46244e66e728238585d3691dae6281d (diff) | |
download | numericx-c-428eecbdcb68543adacf8d091f6c0793db91d61e.tar.gz |
better invalid numeral error message
* invalid numeral error message now indicates which numerals are valid Signed-off-by: Daniel Santos <dacs.git@brilhante.top>
-rw-r--r-- | numericx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numericx.c b/numericx.c index 287b6d0..bf853ba 100644 --- a/numericx.c +++ b/numericx.c @@ -230,9 +230,10 @@ main(int argc, char* argv[]) /* Check if number belongs to it's numerical system */ if( !is_valid_number(from, number) ) { + fprintf(stderr, "error: %s: %s.\nValid numerals are: \"%s\"\n", + PROG_NAME, strerror(EDOM), from); free(from); free(to); - fprintf(stderr, "error: %s: %s.\n", PROG_NAME, strerror(EDOM)); exit(EDOM); } |