[latex3-commits] [git/LaTeX3-latex3-latex3] master: Make IfBooleanTF error message be expandable (baf9bd4)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Mar 4 14:54:38 CET 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/baf9bd4be29612c286c0c5ea49dcd7ba9bd3c0ca

>---------------------------------------------------------------

commit baf9bd4be29612c286c0c5ea49dcd7ba9bd3c0ca
Author: Bruno Le Floch <bruno at le-floch.fr>
Date:   Wed Feb 27 16:52:36 2019 +0100

    Make IfBooleanTF error message be expandable


>---------------------------------------------------------------

baf9bd4be29612c286c0c5ea49dcd7ba9bd3c0ca
 l3packages/xparse/testfiles/xparse004.luatex.tlg |   39 +++++++++++--------
 l3packages/xparse/testfiles/xparse004.tlg        |   39 +++++++++++--------
 l3packages/xparse/testfiles/xparse005.tlg        |   45 +++++++++++++---------
 l3packages/xparse/xparse.dtx                     |   10 ++---
 4 files changed, 78 insertions(+), 55 deletions(-)

diff --git a/l3packages/xparse/testfiles/xparse004.luatex.tlg b/l3packages/xparse/testfiles/xparse004.luatex.tlg
index e695d8c..0d026b2 100644
--- a/l3packages/xparse/testfiles/xparse004.luatex.tlg
+++ b/l3packages/xparse/testfiles/xparse004.luatex.tlg
@@ -821,24 +821,33 @@ something/-NoValue-
 ============================================================
 TEST 28: IfBoolean multi token
 ============================================================
-! LaTeX3 Error: Invalid use \IfBooleanTF {}
-For immediate help type H <return>.
- ...                                              
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                Invalid use \IfBooleanTF {}
 l. ...  }
-The first argument of \IfBoolean(TF/T/F) must be a boolean argument obtained
-from parsing 's' or 't' arguments.
-! LaTeX3 Error: Invalid use \IfBooleanTF {}
-For immediate help type H <return>.
- ...                                              
+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.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                Invalid use \IfBooleanTF {}
 l. ...  }
-The first argument of \IfBoolean(TF/T/F) must be a boolean argument obtained
-from parsing 's' or 't' arguments.
+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.
 FALSE
-! LaTeX3 Error: Invalid use \IfBooleanTF {\ERROR \ERROR }
-For immediate help type H <return>.
- ...                                              
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                Invalid use \IfBooleanTF {\ERROR \ERROR }
 l. ...  }
-The first argument of \IfBoolean(TF/T/F) must be a boolean argument obtained
-from parsing 's' or 't' arguments.
+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.
 FALSE
 ============================================================
diff --git a/l3packages/xparse/testfiles/xparse004.tlg b/l3packages/xparse/testfiles/xparse004.tlg
index 928545f..bfd1983 100644
--- a/l3packages/xparse/testfiles/xparse004.tlg
+++ b/l3packages/xparse/testfiles/xparse004.tlg
@@ -821,24 +821,33 @@ something/-NoValue-
 ============================================================
 TEST 28: IfBoolean multi token
 ============================================================
-! LaTeX3 Error: Invalid use \IfBooleanTF {}
-For immediate help type H <return>.
- ...                                              
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid use \IfBooleanTF {}
 l. ...  }
-The first argument of \IfBoolean(TF/T/F) must be a boolean argument obtained
-from parsing 's' or 't' arguments.
-! LaTeX3 Error: Invalid use \IfBooleanTF {}
-For immediate help type H <return>.
- ...                                              
+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.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid use \IfBooleanTF {}
 l. ...  }
-The first argument of \IfBoolean(TF/T/F) must be a boolean argument obtained
-from parsing 's' or 't' arguments.
+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.
 FALSE
-! LaTeX3 Error: Invalid use \IfBooleanTF {\ERROR \ERROR }
-For immediate help type H <return>.
- ...                                              
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid use \IfBooleanTF {\ERROR \ERROR }
 l. ...  }
-The first argument of \IfBoolean(TF/T/F) must be a boolean argument obtained
-from parsing 's' or 't' arguments.
+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.
 FALSE
 ============================================================
diff --git a/l3packages/xparse/testfiles/xparse005.tlg b/l3packages/xparse/testfiles/xparse005.tlg
index 4e6518f..6c595db 100644
--- a/l3packages/xparse/testfiles/xparse005.tlg
+++ b/l3packages/xparse/testfiles/xparse005.tlg
@@ -317,25 +317,34 @@ l. ...  }
 The argument specification provided was not valid: in a place where a single
 character is required, LaTeX found 'ab'.
 LaTeX will ignore this entire definition.
-! LaTeX3 Error: Invalid use \IfBooleanTF {foo}
-For immediate help type H <return>.
- ...                                              
-l. ...  }
-The first argument of \IfBoolean(TF/T/F) must be a boolean argument obtained
-from parsing 's' or 't' arguments.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid use \IfBooleanTF {foo}
+l. ...  }
+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.
 FALSE
-! LaTeX3 Error: Invalid use \IfBooleanTF {\foo }
-For immediate help type H <return>.
- ...                                              
-l. ...  }
-The first argument of \IfBoolean(TF/T/F) must be a boolean argument obtained
-from parsing 's' or 't' arguments.
-! LaTeX3 Error: Invalid use \IfBooleanTF {?}
-For immediate help type H <return>.
- ...                                              
-l. ...  }
-The first argument of \IfBoolean(TF/T/F) must be a boolean argument obtained
-from parsing 's' or 't' arguments.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid use \IfBooleanTF {\foo }
+l. ...  }
+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.
+! Undefined control sequence.
+<argument> \LaTeX3 error: 
+                           Invalid use \IfBooleanTF {?}
+l. ...  }
+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.
 FALSE
 ============================================================
 ============================================================
diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index 688f1b8..4ce5920 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -4435,12 +4435,8 @@
 %
 % Errors when using commands/environments.
 %    \begin{macrocode}
-\__kernel_msg_new:nnnn { xparse } { if-boolean }
-  { Invalid~use~\iow_char:N\\IfBooleanTF~{#1} }
-  {
-    The~first~argument~of~\iow_char:N\\IfBoolean(TF/T/F)~must~be~
-    a~boolean~argument~obtained~from~parsing~'s'~or~'t'~arguments.
-  }
+\__kernel_msg_new:nnn { xparse } { if-boolean }
+  { Invalid~use~\IfBooleanTF {#1} }
 \__kernel_msg_new:nnnn { xparse } { loop-in-defaults }
   { Circular~dependency~in~defaults~of~'#1'. }
   {
@@ -4716,7 +4712,7 @@
     \prg_break:n { \use:n }
     \prg_break_point:
     {
-      \__kernel_msg_error:nnn { xparse } { if-boolean } {#1}
+      \__kernel_msg_expandable_error:nnn { xparse } { if-boolean } {#1}
       \use_ii:nn
     }
   }





More information about the latex3-commits mailing list