From dee837dc8e8fb84a00f90b0d87ff31d925cbe8c5 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Fri, 10 Dec 2021 21:39:12 -0600 Subject: [PATCH] Update: Support printing errors for F_signal and F_interrupt statuses. --- level_2/fll_error/c/private-error.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/level_2/fll_error/c/private-error.c b/level_2/fll_error/c/private-error.c index a8fcae6..61c4fde 100644 --- a/level_2/fll_error/c/private-error.c +++ b/level_2/fll_error/c/private-error.c @@ -176,6 +176,38 @@ extern "C" { return F_false; } + if (status == F_signal) { + if (print.verbosity != f_console_verbosity_quiet) { + flockfile(print.to.stream); + + fl_print_format("%c%[%SSignal received", print.to.stream, f_string_eol_s[0], print.context, print.prefix); + + private_fll_error_print_function(print, function); + + fl_print_format(".%]%c", print.to.stream, print.context, f_string_eol_s[0]); + + funlockfile(print.to.stream); + } + + return F_false; + } + + if (status == F_interrupt) { + if (print.verbosity != f_console_verbosity_quiet) { + flockfile(print.to.stream); + + fl_print_format("%c%[%SInterrupt signal received", print.to.stream, f_string_eol_s[0], print.context, print.prefix); + + private_fll_error_print_function(print, function); + + fl_print_format(".%]%c", print.to.stream, print.context, f_string_eol_s[0]); + + funlockfile(print.to.stream); + } + + return F_false; + } + if (fallback && print.verbosity != f_console_verbosity_quiet) { if (print.verbosity != f_console_verbosity_quiet) { flockfile(print.to.stream); -- 1.8.3.1