From f198ea35e4fcc6d345925665388e87e170ef1d8f Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 10 Jul 2024 21:40:57 -0500 Subject: [PATCH] Bugfix: Improve Controller error message regarding "file not found..., found". The error message essentially says file not found because file was found. This is crazy confusing. Fix the error message to say something more like unable to create the file because an existing file is found. --- level_2/fll_error/c/error.c | 2 +- level_3/controller/c/rule/private-rule.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/level_2/fll_error/c/error.c b/level_2/fll_error/c/error.c index 61b8772..36ed4cc 100644 --- a/level_2/fll_error/c/error.c +++ b/level_2/fll_error/c/error.c @@ -232,7 +232,7 @@ extern "C" { fl_print_format("%r%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context); fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable); - fl_print_format("%[', found.%]%r", print.to.stream, print.context, print.context, f_string_eol_s); + fl_print_format("%[', found existing %Q.%]%r", print.to.stream, print.context, print.context, type_name, f_string_eol_s); funlockfile(print.to.stream); } diff --git a/level_3/controller/c/rule/private-rule.c b/level_3/controller/c/rule/private-rule.c index 3ecc7f1..99d50b9 100644 --- a/level_3/controller/c/rule/private-rule.c +++ b/level_3/controller/c/rule/private-rule.c @@ -1662,7 +1662,7 @@ extern "C" { } if (status == F_true) { - controller_print_error_file(thread, main->error, F_file_found, "f_file_exists", F_true, pid_file, f_file_operation_find_s, fll_error_file_type_file_e); + controller_print_error_file(thread, main->error, F_file_found, "f_file_exists", F_true, pid_file, f_file_operation_create_s, fll_error_file_type_file_e); return F_status_set_error(F_file_found); } -- 1.8.3.1