From cbdb31c4a7525dcfb87ffc8945a66eb85a757498 Mon Sep 17 00:00:00 2001 From: Otto Sabart Date: Wed, 27 Nov 2024 15:47:33 +0100 Subject: [PATCH] Improve the error message --- tmt/steps/report/junit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmt/steps/report/junit.py b/tmt/steps/report/junit.py index 4345ea793b..85c77e09ae 100644 --- a/tmt/steps/report/junit.py +++ b/tmt/steps/report/junit.py @@ -357,8 +357,8 @@ def _read_log_filter(log: Path) -> str: except etree.XMLSyntaxError as error: phase.verbose('rendered XML', xml_data, 'red') raise tmt.utils.ReportError( - 'The generated XML output is not a valid XML file. Use `--verbose` argument ' - 'to show the output.') from error + 'The generated XML output is not a valid XML file (SyntaxError). Use `--verbose` ' + 'argument to show the output.') from error # Do not be fooled by the `encoding` parameter: even with `utf-8`, `tostring()` will still # return bytes. `unicode`, on the other hand, would give us a string, but then, no XML