[latex3-commits] [git/LaTeX3-latex3-latex2e] kernel-msgs: start normalizing error messages (1383fcba)
Frank Mittelbach
frank.mittelbach at latex-project.org
Wed May 26 10:42:48 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : kernel-msgs
Link : https://github.com/latex3/latex2e/commit/1383fcbaf111b0c5b329583384a1918161adf1b3
>---------------------------------------------------------------
commit 1383fcbaf111b0c5b329583384a1918161adf1b3
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Wed May 26 10:42:48 2021 +0200
start normalizing error messages
>---------------------------------------------------------------
1383fcbaf111b0c5b329583384a1918161adf1b3
base/changes.txt | 5 +++++
base/ltcmdhooks.dtx | 2 +-
base/ltfilehook.dtx | 4 ++--
base/lthooks.dtx | 16 ++++++++++------
base/testfiles-lthooks/lthooks-029.tlg | 2 +-
base/testfiles-lthooks/lthooks-errors.tlg | 6 +++---
6 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index 40cb587b..4d45340d 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2021-05-25 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * lthooks.dtx, ltfilehook.dtx:
+ Normalized some error message texts
+
2021-05-24 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* ltcmd.dtx, ltcmdhooks.dtx, ltfilehook.dtx, lthooks.dtx, ltpara.dtx:
diff --git a/base/ltcmdhooks.dtx b/base/ltcmdhooks.dtx
index a4555f8a..3971cd90 100644
--- a/base/ltcmdhooks.dtx
+++ b/base/ltcmdhooks.dtx
@@ -1046,7 +1046,7 @@
}
{
You~tried~to~add~a~hook~to~command~\iow_char:N \\#1,~but~`#2'~
- is~an~invalid~position.~Only~`before'~or~`after'~are~allowed.
+ is~an~invalid~component.~Only~`before'~or~`after'~are~allowed.
}
\msg_new:nnnn { hooks } { cant-patch }
{
diff --git a/base/ltfilehook.dtx b/base/ltfilehook.dtx
index a85c921c..5d0acc8f 100644
--- a/base/ltfilehook.dtx
+++ b/base/ltfilehook.dtx
@@ -32,7 +32,7 @@
%
% \begin{macrocode}
\providecommand\ltfilehookversion{v1.0k}
-\providecommand\ltfilehookdate{2021/05/24}
+\providecommand\ltfilehookdate{2021/05/25}
% \end{macrocode}
%
%<*driver>
@@ -608,7 +608,7 @@
\seq_gpop:NNTF \g_@@_input_file_seq \l_@@_internal_tl
{ \exp_after:wN \@@_file_pop_assign:nnnn \l_@@_internal_tl }
{
- \msg_error:nnn { hooks } { should-not-happen }
+ \msg_error:nnn { kernel } { should-not-happen }
{ Tried~to~pop~from~an~empty~file~name~stack. }
}
}
diff --git a/base/lthooks.dtx b/base/lthooks.dtx
index 4991cb61..53e80bde 100644
--- a/base/lthooks.dtx
+++ b/base/lthooks.dtx
@@ -32,7 +32,7 @@
%
% \begin{macrocode}
\def\lthooksversion{v1.0n}
-\def\lthooksdate{2021/05/24}
+\def\lthooksdate{2021/05/25}
% \end{macrocode}
%
%<*driver>
@@ -2610,7 +2610,7 @@
{
\tl_if_empty:NTF \@currname
{
- \msg_expandable_error:nnn { hooks } { should-not-happen }
+ \msg_expandable_error:nnn { kernel } { should-not-happen }
{ Empty~default~label. }
\@@_make_name:n { label-missing }
}
@@ -4541,7 +4541,11 @@
% Hook errors are LaTeX kernel errors:
% \begin{macrocode}
\prop_gput:Nnn \g_msg_module_type_prop { hooks } { LaTeX }
-%\prop_gput:Nnn \g_msg_module_name_prop { hooks } { }
+% \end{macrocode}
+% And so are kernel errors (this should move elsewhere eventually).
+% \begin{macrocode}
+\prop_gput:Nnn \g_msg_module_type_prop { kernel } { LaTeX }
+%\prop_gput:Nnn \g_msg_module_name_prop { kernel } { } % <-- currently not working
% \end{macrocode}
%
% \begin{macrocode}
@@ -4656,9 +4660,9 @@
% \end{macrocode}
%
% \begin{macrocode}
-\msg_new:nnn { hooks } { should-not-happen }
+\msg_new:nnn { kernel } { should-not-happen }
{
- ERROR!~This~should~not~happen.~#1 \\
+ This~should~not~happen.~#1 \\
Please~report~at~https://github.com/latex3/latex2e.
}
% \end{macrocode}
@@ -4668,7 +4672,7 @@
% \begin{macrocode}
\msg_new:nnn { hooks } { provide-disabled }
{
- Can't~ provide~ hook~ '#1'~ because~ it~ is~ disabled!
+ Cannot~ provide~ hook~ '#1'~ because~ it~ is~ disabled!
}
% \end{macrocode}
%
diff --git a/base/testfiles-lthooks/lthooks-029.tlg b/base/testfiles-lthooks/lthooks-029.tlg
index 958b4907..cd2f5e9d 100644
--- a/base/testfiles-lthooks/lthooks-029.tlg
+++ b/base/testfiles-lthooks/lthooks-029.tlg
@@ -131,7 +131,7 @@ previously declared as a reversed hook. A redeclaration is not possible.
<recently read> }
l. ...\ShowHook{ccc}
------------ provide hook that was disabled --------------
-LaTeX hooks Warning: Can't provide hook 'ddd' because it is disabled!
+LaTeX hooks Warning: Cannot provide hook 'ddd' because it is disabled!
-> The hook 'ddd':
> The hook is not declared.
> The hook is disabled.
diff --git a/base/testfiles-lthooks/lthooks-errors.tlg b/base/testfiles-lthooks/lthooks-errors.tlg
index 6bd5038d..c092960b 100644
--- a/base/testfiles-lthooks/lthooks-errors.tlg
+++ b/base/testfiles-lthooks/lthooks-errors.tlg
@@ -33,9 +33,9 @@ incompatibility between packages.
> label5|label1 with relation xE
> Execution order (after applying rules):
> label1, label2, label3, label4, label5.
-! LaTeX hooks Error: ERROR! This should not happen. Tried to pop from an empty
-(hooks) file name stack.
-(hooks) Please report at https://github.com/latex3/latex2e.
+! LaTeX kernel Error: This should not happen. Tried to pop from an empty file
+(kernel) name stack.
+(kernel) Please report at https://github.com/latex3/latex2e.
Type <return> to continue.
...
l. ...\@expl@@@filehook at file@pop@@
More information about the latex3-commits
mailing list.