[latex3-commits] [git/LaTeX3-latex3-latex3] gh931-expandable-errors: Shorten a few expandable error messages to avoid LuaTeX-specific logs (785754764)
Bruno Le Floch
blflatex at gmail.com
Wed May 19 16:22:27 CEST 2021
Repository : https://github.com/latex3/latex3
On branch : gh931-expandable-errors
Link : https://github.com/latex3/latex3/commit/785754764f3efebe8439b81c13384f2a7463d272
>---------------------------------------------------------------
commit 785754764f3efebe8439b81c13384f2a7463d272
Author: Bruno Le Floch <blflatex at gmail.com>
Date: Wed May 19 16:21:51 2021 +0200
Shorten a few expandable error messages to avoid LuaTeX-specific logs
>---------------------------------------------------------------
785754764f3efebe8439b81c13384f2a7463d272
l3kernel/l3file.dtx | 18 +++++++++---------
l3kernel/l3fp-logic.dtx | 4 ++--
l3kernel/l3msg.dtx | 4 ++--
l3kernel/l3regex.dtx | 2 +-
l3kernel/testfiles/m3compare001.tlg | 6 +++---
l3kernel/testfiles/m3fp-logic004.luatex.tlg | 29 +++++++++++++++++------------
l3kernel/testfiles/m3fp-logic004.tlg | 25 ++++++++++++-------------
l3kernel/testfiles/m3int003.tlg | 8 +++++---
l3kernel/testfiles/m3msg002.tlg | 17 +++++++++++------
l3kernel/testfiles/m3regex009.tlg | 3 ++-
l3kernel/testfiles/m3skip006.tlg | 8 +++++---
11 files changed, 69 insertions(+), 55 deletions(-)
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index a5ab4bf3f..ce851ee5e 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -1845,14 +1845,14 @@
% \begin{macrocode}
\cs_new_protected:Npn \iow_allow_break:
{
- \__kernel_msg_error:nnnn { kernel } { iow-indent }
- { \iow_wrap:nnnN } { \iow_allow_break: }
+ \__kernel_msg_error:nnxx { kernel } { iow-indent }
+ { \iow_char:N\\iow_wrap:nnnN } { \iow_char:N\\iow_allow_break: }
}
\cs_new:Npx \@@_allow_break: { \c_@@_wrap_allow_break_marker_tl }
\cs_new:Npn \@@_allow_break_error:
{
- \__kernel_msg_expandable_error:nnnn { kernel } { iow-indent }
- { \iow_wrap:nnnN } { \iow_allow_break: }
+ \__kernel_msg_expandable_error:nnff { kernel } { iow-indent }
+ { \iow_char:N\\iow_wrap:nnnN } { \iow_char:N\\iow_allow_break: }
}
% \end{macrocode}
% \end{macro}
@@ -1872,8 +1872,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \iow_indent:n #1
{
- \__kernel_msg_error:nnnnn { kernel } { iow-indent }
- { \iow_wrap:nnnN } { \iow_indent:n } {#1}
+ \__kernel_msg_error:nnfff { kernel } { iow-indent }
+ { \iow_char:N\\iow_wrap:nnnN } { \iow_char:N\\iow_indent:n } {#1}
#1
}
\cs_new:Npx \@@_indent:n #1
@@ -1884,8 +1884,8 @@
}
\cs_new:Npn \@@_indent_error:n #1
{
- \__kernel_msg_expandable_error:nnnnn { kernel } { iow-indent }
- { \iow_wrap:nnnN } { \iow_indent:n } {#1}
+ \__kernel_msg_expandable_error:nnfff { kernel } { iow-indent }
+ { \iow_char:N\\iow_wrap:nnnN } { \iow_char:N\\iow_indent:n } {#1}
#1
}
% \end{macrocode}
@@ -3731,7 +3731,7 @@
File~names~must~contain~balanced~numbers~of~quotes~(").
}
\__kernel_msg_new:nnnn { kernel } { iow-indent }
- { Only~#1 (arg~1)~allows~#2 }
+ { #2~outside~#1~(arg~1) }
{
The~command~#2 can~only~be~used~in~messages~
which~will~be~wrapped~using~#1.
diff --git a/l3kernel/l3fp-logic.dtx b/l3kernel/l3fp-logic.dtx
index 165d955d7..a4e76ffa6 100644
--- a/l3kernel/l3fp-logic.dtx
+++ b/l3kernel/l3fp-logic.dtx
@@ -509,9 +509,9 @@
\__kernel_msg_new:nnn { fp } { step-tuple }
{ Tuple~argument~in~fp_step_...~{#1}{#2}{#3}. }
\__kernel_msg_new:nnn { fp } { bad-step }
- { Invalid~step~size~#2~in~step~function~#3. }
+ { Invalid~step~size~#2~for~function~#3. }
\__kernel_msg_new:nnn { fp } { tiny-step }
- { Tiny~step~size~(#1+#2=#1)~in~step~function~#3. }
+ { Tiny~step~size~(#1+#2=#1)~for~function~#3. }
% \end{macrocode}
%
% \subsection{Extrema}
diff --git a/l3kernel/l3msg.dtx b/l3kernel/l3msg.dtx
index 0ef67e8cf..90dede14d 100644
--- a/l3kernel/l3msg.dtx
+++ b/l3kernel/l3msg.dtx
@@ -2122,9 +2122,9 @@
\__kernel_msg_new:nnn { prop } { prop-keyval }
{ Missing/extra~'='~in~'#1'~(in~'..._keyval:Nn') }
\__kernel_msg_new:nnn { kernel } { unknown-comparison }
- { Relation~'#1'~unknown:~use~=,~<,~>,~==,~!=,~<=,~>=. }
+ { Relation~'#1'~not~among~=,~<,~>,~==,~!=,~<=,~>=. }
\__kernel_msg_new:nnn { kernel } { zero-step }
- { Zero~step~size~for~step~function~#1. }
+ { Zero~step~size~for~function~#1. }
\cs_if_exist:NF \tex_expanded:D
{
\__kernel_msg_new:nnn { kernel } { e-type }
diff --git a/l3kernel/l3regex.dtx b/l3kernel/l3regex.dtx
index ae611f2e9..378923f57 100644
--- a/l3kernel/l3regex.dtx
+++ b/l3kernel/l3regex.dtx
@@ -7288,7 +7288,7 @@
\use:x
{
\__kernel_msg_new:nnn { regex } { trailing-backslash }
- { Trailing~escape~char~'\iow_char:N\\'~in~regex~or~replacement. }
+ { Trailing~'\iow_char:N\\'~in~regex~or~replacement. }
\__kernel_msg_new:nnn { regex } { x-missing-rbrace }
{
Missing~brace~'\iow_char:N\}'~in~regex~
diff --git a/l3kernel/testfiles/m3compare001.tlg b/l3kernel/testfiles/m3compare001.tlg
index 9e6a6e2a7..65e712796 100644
--- a/l3kernel/testfiles/m3compare001.tlg
+++ b/l3kernel/testfiles/m3compare001.tlg
@@ -418,17 +418,17 @@ TEST 3: Some more erroneous comparisons
============================================================
! Extra \or.
<argument> \
- LaTeX3 Error: Relation ':' unknown: use =, <, >, ==, !=, <=,...
+ LaTeX3 Error: Relation ':' not among =, <, >, ==, !=, <=, >=.
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Relation ':' unknown: use =, <, >, ==, !=, <=,...
+ LaTeX3 Error: Relation ':' not among =, <, >, ==, !=, <=, >=.
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Relation '\?' unknown: use =, <, >, ==, !=, <=...
+ LaTeX3 Error: Relation '\?' not among =, <, >, ==, !=, <=, >=.
l. ... }
I'm ignoring this; it doesn't match any \if.
FALSEFALSEFALSE
diff --git a/l3kernel/testfiles/m3fp-logic004.luatex.tlg b/l3kernel/testfiles/m3fp-logic004.luatex.tlg
index e883c409b..3737f1163 100644
--- a/l3kernel/testfiles/m3fp-logic004.luatex.tlg
+++ b/l3kernel/testfiles/m3fp-logic004.luatex.tlg
@@ -6,12 +6,12 @@ TEST 1: fp_step_function
============================================================
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \TYPE .
+ LaTeX3 Error: Zero step size for function \TYPE .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Invalid step size inf in step function \TYPE .
+ LaTeX3 Error: Invalid step size inf for function \TYPE .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
@@ -21,11 +21,12 @@ l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (-inf+1=-inf) in step function \test_type:n .l. ... }
+ LaTeX3 Error: Tiny step size (-inf+1=-inf) for function \test_type:n .
+l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (1e16+1=1e16) in step function \TYPE .
+ LaTeX3 Error: Tiny step size (1e16+1=1e16) for function \TYPE .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
@@ -80,12 +81,12 @@ TEST 2: fp_step_inline
0
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \__fp_map_1:w .
+ LaTeX3 Error: Zero step size for function \__fp_map_1:w .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Invalid step size inf in step function \__fp_map_1:w .
+ LaTeX3 Error: Invalid step size inf for function \__fp_map_1:w .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
@@ -96,14 +97,16 @@ I'm ignoring this; it doesn't match any \if.
-10000000000000000000000000000...
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (-inf+1=-inf) in step function \__fp_map_1:w l. ... }
+ LaTeX3 Error: Tiny step size (-inf+1=-inf) for function \__fp_map_1:w .
+l. ... }
I'm ignoring this; it doesn't match any \if.
9999999999999998
9999999999999999
10000000000000000
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (1e16+1=1e16) in step function \__fp_map_1:w l. ... }
+ LaTeX3 Error: Tiny step size (1e16+1=1e16) for function \__fp_map_1:w .
+l. ... }
I'm ignoring this; it doesn't match any \if.
============================================================
============================================================
@@ -133,12 +136,12 @@ TEST 3: fp_step_variable
0
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \__fp_map_1:w .
+ LaTeX3 Error: Zero step size for function \__fp_map_1:w .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Invalid step size inf in step function \__fp_map_1:w .
+ LaTeX3 Error: Invalid step size inf for function \__fp_map_1:w .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
@@ -149,13 +152,15 @@ I'm ignoring this; it doesn't match any \if.
-10000000000000000000000000000...
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (-inf+1=-inf) in step function \__fp_map_1:w l. ... }
+ LaTeX3 Error: Tiny step size (-inf+1=-inf) for function \__fp_map_1:w .
+l. ... }
I'm ignoring this; it doesn't match any \if.
9999999999999998
9999999999999999
10000000000000000
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (1e16+1=1e16) in step function \__fp_map_1:w l. ... }
+ LaTeX3 Error: Tiny step size (1e16+1=1e16) for function \__fp_map_1:w .
+l. ... }
I'm ignoring this; it doesn't match any \if.
============================================================
diff --git a/l3kernel/testfiles/m3fp-logic004.tlg b/l3kernel/testfiles/m3fp-logic004.tlg
index a28a0a6d5..89bd58a6c 100644
--- a/l3kernel/testfiles/m3fp-logic004.tlg
+++ b/l3kernel/testfiles/m3fp-logic004.tlg
@@ -6,12 +6,12 @@ TEST 1: fp_step_function
============================================================
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \TYPE .
+ LaTeX3 Error: Zero step size for function \TYPE .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Invalid step size inf in step function \TYPE .
+ LaTeX3 Error: Invalid step size inf for function \TYPE .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
@@ -21,13 +21,12 @@ l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (-inf+1=-inf) in step function ...
+ LaTeX3 Error: Tiny step size (-inf+1=-inf) for function \tes...
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (1e16+1=1e16) in step function ...
-l. ... }
+ LaTeX3 Error: Tiny step size (1e16+1=1e16) for function \TYPE .l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
@@ -80,12 +79,12 @@ TEST 2: fp_step_inline
0
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \__fp_map_1:w .
+ LaTeX3 Error: Zero step size for function \__fp_map_1:w .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Invalid step size inf in step function \__fp_m...
+ LaTeX3 Error: Invalid step size inf for function \__fp_map_1...
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
@@ -96,7 +95,7 @@ I'm ignoring this; it doesn't match any \if.
-10000000000000000000000000000...
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (-inf+1=-inf) in step function ...
+ LaTeX3 Error: Tiny step size (-inf+1=-inf) for function \__f...
l. ... }
I'm ignoring this; it doesn't match any \if.
9999999999999998
@@ -104,7 +103,7 @@ I'm ignoring this; it doesn't match any \if.
10000000000000000
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (1e16+1=1e16) in step function ...
+ LaTeX3 Error: Tiny step size (1e16+1=1e16) for function \__f...
l. ... }
I'm ignoring this; it doesn't match any \if.
============================================================
@@ -135,12 +134,12 @@ TEST 3: fp_step_variable
0
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \__fp_map_1:w .
+ LaTeX3 Error: Zero step size for function \__fp_map_1:w .
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
<argument> \
- LaTeX3 Error: Invalid step size inf in step function \__fp_m...
+ LaTeX3 Error: Invalid step size inf for function \__fp_map_1...
l. ... }
I'm ignoring this; it doesn't match any \if.
! Extra \or.
@@ -151,7 +150,7 @@ I'm ignoring this; it doesn't match any \if.
-10000000000000000000000000000...
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (-inf+1=-inf) in step function ...
+ LaTeX3 Error: Tiny step size (-inf+1=-inf) for function \__f...
l. ... }
I'm ignoring this; it doesn't match any \if.
9999999999999998
@@ -159,7 +158,7 @@ I'm ignoring this; it doesn't match any \if.
10000000000000000
! Extra \or.
<argument> \
- LaTeX3 Error: Tiny step size (1e16+1=1e16) in step function ...
+ LaTeX3 Error: Tiny step size (1e16+1=1e16) for function \__f...
l. ... }
I'm ignoring this; it doesn't match any \if.
============================================================
diff --git a/l3kernel/testfiles/m3int003.tlg b/l3kernel/testfiles/m3int003.tlg
index 5e983ce7b..00863bed3 100644
--- a/l3kernel/testfiles/m3int003.tlg
+++ b/l3kernel/testfiles/m3int003.tlg
@@ -117,7 +117,7 @@ TEST 8: Stepwise
============================================================
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \myfunc .
+ LaTeX3 Error: Zero step size for function \myfunc .
l. ... }
I'm ignoring this; it doesn't match any \if.
A:[0] [1] [2] [3] [4] [5]
@@ -155,7 +155,8 @@ NO
============================================================
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \__int_map_1:w .l. ... }
+ LaTeX3 Error: Zero step size for function \__int_map_1:w .
+l. ... }
I'm ignoring this; it doesn't match any \if.
============================================================
[-6]
@@ -192,7 +193,8 @@ NO
============================================================
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \__int_map_1:w .l. ... }
+ LaTeX3 Error: Zero step size for function \__int_map_1:w .
+l. ... }
I'm ignoring this; it doesn't match any \if.
============================================================
[-6]
diff --git a/l3kernel/testfiles/m3msg002.tlg b/l3kernel/testfiles/m3msg002.tlg
index ce95085d9..7f9849d05 100644
--- a/l3kernel/testfiles/m3msg002.tlg
+++ b/l3kernel/testfiles/m3msg002.tlg
@@ -129,16 +129,21 @@ a foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
TEST 7: Misused indentation
============================================================
1
-! LaTeX3 Error: Only \iow_wrap:nnnN (arg 1) allows \iow_indent:n
-For immediate help type H <return>.
- ...
+! Undefined control sequence.
+\iow_indent:n #1->\__kernel_msg_error:nnfff
+ {kernel}{iow-indent}{\iow_char:N...
l. ... }
-The command \iow_indent:n can only be used in messages which will be wrapped
-using \iow_wrap:nnnN . It was called with argument '\TYPE {2}'.
+The control sequence at the end of the top line
+of your error message was never \def'ed. If you have
+misspelled it (e.g., `\hobx'), type `I' and the correct
+spelling (e.g., `I\hbox'). Otherwise just continue,
+and I'll forget about whatever was undefined.
+2
2
! Extra \or.
<argument> \
- LaTeX3 Error: Only \iow_wrap:nnnN (arg 1) allows \iow_indent:n l. ... }
+ LaTeX3 Error: \iow_indent:n outside \iow_wrap:nnnN (arg 1)
+l. ... }
I'm ignoring this; it doesn't match any \if.
works works works works works works works works works works works works
3 works works works works works works works works works works works works
diff --git a/l3kernel/testfiles/m3regex009.tlg b/l3kernel/testfiles/m3regex009.tlg
index d4f0df2b7..ecb37a7ac 100644
--- a/l3kernel/testfiles/m3regex009.tlg
+++ b/l3kernel/testfiles/m3regex009.tlg
@@ -7,7 +7,8 @@ TEST 1: Malformed letter escapes
"\"
! Extra \or.
<argument> \
- LaTeX3 Error: Trailing escape char '\' in regex or replacement.l. ... }
+ LaTeX3 Error: Trailing '\' in regex or replacement.
+l. ... }
I'm ignoring this; it doesn't match any \if.
"\g"
"\i"
diff --git a/l3kernel/testfiles/m3skip006.tlg b/l3kernel/testfiles/m3skip006.tlg
index 2d3b173c4..2b35bb01a 100644
--- a/l3kernel/testfiles/m3skip006.tlg
+++ b/l3kernel/testfiles/m3skip006.tlg
@@ -6,7 +6,7 @@ TEST 1: dim_step_function
============================================================
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \TYPE .
+ LaTeX3 Error: Zero step size for function \TYPE .
l. ... }
I'm ignoring this; it doesn't match any \if.
0.0pt0.1pt0.20001pt0.30002pt0.40002pt0.50003pt0.60004pt0.70004pt0.80005pt0.90005pt
@@ -37,7 +37,8 @@ TEST 2: dim_step_inline
0.09995pt
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \__dim_map_1:w .l. ... }
+ LaTeX3 Error: Zero step size for function \__dim_map_1:w .
+l. ... }
I'm ignoring this; it doesn't match any \if.
============================================================
============================================================
@@ -65,6 +66,7 @@ TEST 3: dim_step_variable
0.09995pt
! Extra \or.
<argument> \
- LaTeX3 Error: Zero step size for step function \__dim_map_1:w .l. ... }
+ LaTeX3 Error: Zero step size for function \__dim_map_1:w .
+l. ... }
I'm ignoring this; it doesn't match any \if.
============================================================
More information about the latex3-commits
mailing list.