From c8a9f8dcf584454f78edb409f53dc661fef11af5 Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Sun, 7 Jun 2020 23:04:42 +0200 Subject: [PATCH] better domain error in format_//2 Example: ?- format("", [hello]). caught: error(domain_error(empty_list,[hello]),format_//2) --- src/prolog/lib/format.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prolog/lib/format.pl b/src/prolog/lib/format.pl index 18289094..8b090cf6 100644 --- a/src/prolog/lib/format.pl +++ b/src/prolog/lib/format.pl @@ -158,7 +158,7 @@ element_gluevar(glue(_,V), N, N) --> [V]. cells([], Args, Tab, Es) --> ( { Args == [] } -> cell(Tab, Tab, Es) - ; { domain_error(no_remaining_arguments, Args, format_//2) } + ; { domain_error(empty_list, Args, format_//2) } ). cells([~,~|Fs], Args, Tab, Es) --> !, cells(Fs, Args, Tab, [chars("~")|Es]). -- 2.54.0