[latex3-commits] [git/LaTeX3-latex3-latex3] gh795: Make error messages more generic to be reused (fca922bf2)

PhelypeOleinik phelype.oleinik at latex-project.org
Thu Jan 14 19:30:56 CET 2021


Repository : https://github.com/latex3/latex3
On branch  : gh795
Link       : https://github.com/latex3/latex3/commit/fca922bf2a6aa78dc6ccd97fffe504b5dadfd3bb

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

commit fca922bf2a6aa78dc6ccd97fffe504b5dadfd3bb
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Thu Jan 14 15:30:56 2021 -0300

    Make error messages more generic to be reused


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

fca922bf2a6aa78dc6ccd97fffe504b5dadfd3bb
 l3packages/xparse/xparse.dtx | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index 51809a9f9..82e1fa563 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -4387,14 +4387,10 @@
 \cs_new_protected:Npn \@@_get_arg_spec_error_aux:n #1
   {
     #1
-      {
-        \__kernel_msg_error:nnx { xparse } { non-xparse }
+      { \__kernel_msg_error:nnxx { xparse } { non-xparse } }
+      { \__kernel_msg_error:nnxx { xparse } { unknown } }
           { \@@_environment_or_command: }
-      }
-      {
-        \__kernel_msg_error:nnx { xparse } { unknown }
-          { \@@_environment_or_command: }
-      }
+          { for~the~argument~specification~for~the }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -4882,10 +4878,7 @@
   }
 \__kernel_msg_new:nnnn { xparse } { non-xparse }
   { \str_uppercase:n #1~not~defined~using~xparse. }
-  {
-    You~have~asked~for~the~argument~specification~for~the~#1,~
-    but~this~was~not~defined~using~xparse.
-  }
+  { You~have~asked~#2~#1,~but~this~was~not~defined~using~xparse. }
 \__kernel_msg_new:nnnn { xparse } { split-excess-tokens }
   { Too~many~'#1'~tokens~when~trying~to~split~argument. }
   {
@@ -4895,10 +4888,7 @@
   }
 \__kernel_msg_new:nnnn { xparse } { unknown }
   { Unknown~document~#1. }
-  {
-    You~have~asked~for~the~argument~specification~for~the~#1,~
-    but~it~is~not~defined.
-  }
+  { You~have~asked~#2~#1,~but~it~is~not~defined. }
 \__kernel_msg_new:nnnn { xparse } { verbatim-newline }
   { Verbatim~argument~of~#1~ended~by~end~of~line. }
   {





More information about the latex3-commits mailing list.