From bd6db14cc7e1f2af76ae2e890030aebb12ee2bc6 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Mon, 20 Feb 2023 00:11:26 -0600 Subject: [PATCH] Bugfix: Printed error message is not utilize verbosity quite mode. Also add appropriate color context. --- level_3/fake/c/private-make-operate_validate_type.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/level_3/fake/c/private-make-operate_validate_type.c b/level_3/fake/c/private-make-operate_validate_type.c index 5070dc4..f6dd3ac 100644 --- a/level_3/fake/c/private-make-operate_validate_type.c +++ b/level_3/fake/c/private-make-operate_validate_type.c @@ -1380,7 +1380,15 @@ extern "C" { for (f_array_length_t i = 0; i < 33; ++i) { if (fl_string_dynamic_compare(reserved_name[i], data_make->cache_arguments.array[0]) == F_equal_to) { - fll_print_format("%r%[%QCannot assign a value to the parameter name '%r' because it is a reserved parameter name.%]%r", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, reserved_name[i], data_make->error.context, f_string_eol_s); + if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) { + flockfile(data_make->error.to.stream); + + fl_print_format("%r%[%QCannot assign a value to the parameter name '%]", data_make->error.to.stream, f_string_eol_s, data_make->error.context, data_make->error.prefix, data_make->error.context); + fl_print_format("%[%Q%]", data_make->error.to.stream, data_make->error.notable, reserved_name[i], data_make->error.notable); + fl_print_format("%[' because it is a reserved parameter name.%]%r", data_make->error.to.stream, data_make->error.context, data_make->error.context, f_string_eol_s); + + funlockfile(data_make->error.to.stream); + } status = F_status_set_error(F_failure); } -- 1.8.3.1