]> Kevux Git Server - fll/commitdiff
Update: handle F_incomplete_utf status.
authorKevin Day <thekevinday@gmail.com>
Mon, 23 Nov 2020 03:53:57 +0000 (21:53 -0600)
committerKevin Day <thekevinday@gmail.com>
Mon, 23 Nov 2020 03:53:57 +0000 (21:53 -0600)
level_2/fll_error/c/private-error.c

index 46ab32f97e0ebc2b79cfc15e78b8e6f63f77b32f..744283d0fadd1e8f0a611d582f075f029f118641 100644 (file)
@@ -86,6 +86,19 @@ extern "C" {
       return F_false;
     }
 
+    if (status == F_incomplete_utf) {
+      if (error.verbosity != f_console_verbosity_quiet) {
+        fprintf(error.to.stream, "%c", f_string_eol[0]);
+        fprintf(error.to.stream, "%s%sInvalid (incomplete) UTF-8 character while calling ", error.context.before->string, error.prefix ? error.prefix : "");
+
+        private_fll_error_print_function(error, function);
+
+        fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol[0]);
+      }
+
+      return F_false;
+    }
+
     if (fallback && error.verbosity != f_console_verbosity_quiet) {
       if (error.verbosity != f_console_verbosity_quiet) {
         fprintf(error.to.stream, "%c", f_string_eol[0]);