2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 885e2ce4 authored by di68kap's avatar di68kap
Browse files

- LaTeXCompiler: adjustment to new error reporting scheme

parent 09196c53
......@@ -690,9 +690,9 @@ class LaTeXCompiler(Compiler):
if 'language' in node.attributes:
self.metadata['language'] = it
else:
node.add_error('Only one document language supported. '
'Using %s, ignoring %s.'
% (self.metadata['language'], it), Error.WARNING)
self.tree.add_error(node, 'Only one document language supported. '
'Using %s, ignoring %s.'
% (self.metadata['language'], it), Error.WARNING)
if node['text'] in self.KNOWN_DOCUMENT_CLASSES:
self.metadata['documentclass'] = node['text']
return node
......
......@@ -23,6 +23,11 @@ Fail-test "10"
### Test-code:
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Test of parser: "GAP"
=====================
......@@ -99,6 +104,11 @@ Fail-test "10"
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "11"
--------------
......@@ -110,6 +120,12 @@ Fail-test "11"
% Comment
### Messages:
Error: Parser stopped before end! trying to recover...
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Test of parser: "PARSEP"
========================
......@@ -202,6 +218,11 @@ Fail-test "10"
### Test-code:
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "11"
--------------
......@@ -209,6 +230,11 @@ Fail-test "11"
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "12"
--------------
......@@ -216,6 +242,17 @@ Fail-test "12"
% Comment
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "13"
--------------
......@@ -224,6 +261,17 @@ Fail-test "13"
% Comment
% Comment
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Test of parser: "WSPC"
======================
......@@ -354,6 +402,11 @@ Fail-test "10"
### Test-code:
X
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Test of parser: "LFF"
=====================
......@@ -420,6 +473,11 @@ Fail-test "10"
### Test-code:
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Test of parser: "LF"
====================
......@@ -495,4 +553,10 @@ Fail-test "10"
### Test-code:
\ No newline at end of file
### Messages:
Error: Parser stopped before end! trying to recover...
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
\ No newline at end of file
......@@ -21,24 +21,48 @@ Fail-test "10"
### Test-code:
Low-level text must not contain \& escaped characters.
### Messages:
Error: Parser stopped before end! trying to recover...
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "11"
--------------
### Test-code:
Low-level text must not contain ] [ brackets.
### Messages:
Error: Parser stopped before end! trying to recover...
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "12"
--------------
### Test-code:
Low-level text must not contain { environments }.
### Messages:
Error: Parser stopped before end! trying to recover...
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "13"
--------------
### Test-code:
Low-level text must not contain any \commands.
### Messages:
Error: Parser stopped before end! trying to recover...
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Test of parser: "text_element"
==============================
......
......@@ -553,24 +553,46 @@ Fail-test "20"
Like this one.
### Messages:
Error: Parser stopped before end! trying to recover...
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "21"
--------------
### Test-code:
\begin{enumerate}
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "22"
--------------
### Test-code:
\item
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "23"
--------------
### Test-code:
und Vieh; \paragraph
### Messages:
Error: Parser stopped before end! trying to recover...
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Fail-test "24"
--------------
......@@ -581,6 +603,10 @@ Fail-test "24"
\end{quotation}
like block quotes.
### Messages:
Error: Parser stopped before end! trying to recover...
Error: Parser stopped before end too often! Terminating parser.
Test of parser: "sequence"
==========================
......
......@@ -102,6 +102,12 @@ Fail-test "10"
\begin{generic}inline environment\end{generic}
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Error: Capture-retrieve-stack not empty after end of parsing: defaultdict(<function Grammar._reset__.<locals>.<lambda> at 0x0000000003A93488>, {'NAME': ['generic']})
Fail-test "11"
--------------
......@@ -110,6 +116,15 @@ Fail-test "11"
\end{generic}
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Error: Capture-retrieve-stack not empty after end of parsing: defaultdict(<function Grammar._reset__.<locals>.<lambda> at 0x0000000003A93598>, {'NAME': ['generic']})
Fail-test "12"
--------------
......@@ -118,6 +133,10 @@ Fail-test "12"
invalid enivronment \end{generic}
### Messages:
Error: -&LB end_environment LFF expected; "\end{gener" found!
Error: Capture-retrieve-stack not empty after end of parsing: defaultdict(<function Grammar._reset__.<locals>.<lambda> at 0x0000000003A93488>, {'NAME': ['generic']})
Test of parser: "inline_environment"
====================================
......@@ -189,6 +208,15 @@ Fail-test "10"
invalid enivronment \end{generic}
### Messages:
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Error: Capture-retrieve-stack not empty after end of parsing: defaultdict(<function Grammar._reset__.<locals>.<lambda> at 0x0000000003A93488>, {'NAME': ['generic']})
Test of parser: "itemize"
=========================
......@@ -308,6 +336,13 @@ Fail-test "11"
Free text is not allowed within an itemized environment!
\end{itemize}
### Messages:
Error: "\end{itemize}" expected; "Free text " found!
Error: Parser stopped before end! trying to recover...
Error: Parser did not match! Invalid source file?
Most advanced: None
Last match: None;
Test of parser: "enumerate"
===========================
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment