From 428eecbdcb68543adacf8d091f6c0793db91d61e Mon Sep 17 00:00:00 2001 From: Daniel Santos Date: Sun, 13 Mar 2022 14:28:09 +0000 Subject: [PATCH] better invalid numeral error message * invalid numeral error message now indicates which numerals are valid Signed-off-by: Daniel Santos --- numericx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); }