Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1b393c4

Browse filesBrowse files
committed
Include tex output in pdf LatexError.
This will make it easier to troubleshoot failures on CI.
1 parent 4da4cf9 commit 1b393c4
Copy full SHA for 1b393c4

File tree

Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed

‎lib/matplotlib/backends/backend_pgf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pgf.py
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ def __init__(self, message, latex_output=""):
192192
super().__init__(message)
193193
self.latex_output = latex_output
194194

195+
def __str__(self):
196+
s, = self.args
197+
if self.latex_output:
198+
s += "\n" + self.latex_output
199+
return s
200+
195201

196202
class LatexManager:
197203
"""
@@ -286,7 +292,7 @@ def __init__(self):
286292
stdout, stderr = latex.communicate(test_input)
287293
if latex.returncode != 0:
288294
raise LatexError("LaTeX returned an error, probably missing font "
289-
"or error in preamble:\n%s" % stdout)
295+
"or error in preamble.", stdout)
290296

291297
self.latex = None # Will be set up on first use.
292298
self.str_cache = {} # cache for strings already processed

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.