Display stderr and stdout for LaTeX too.

This commit is contained in:
Georg Brandl 2008-08-15 19:21:09 +00:00
parent e6a6087335
commit a8c1a75e81

View File

@ -112,7 +112,8 @@ def render_math(self, math):
return relfn, None return relfn, None
stdout, stderr = p.communicate() stdout, stderr = p.communicate()
if p.returncode != 0: if p.returncode != 0:
raise MathExtError('latex exited with error:\n' + stdout) raise MathExtError('latex exited with error:\n[stderr]\n%s\n[stdout]\n%s'
% (stderr, stdout))
ensuredir(path.dirname(outfn)) ensuredir(path.dirname(outfn))
# use some standard dvipng arguments # use some standard dvipng arguments
@ -137,8 +138,8 @@ def render_math(self, math):
return relfn, None return relfn, None
stdout, stderr = p.communicate() stdout, stderr = p.communicate()
if p.returncode != 0: if p.returncode != 0:
raise MathExtError('dvipng exited with error:\n[stdout]\n%s\n[stderr]%s' raise MathExtError('dvipng exited with error:\n[stderr]\n%s\n[stdout]\n%s'
% (stdout, stderr)) % (stderr, stdout))
depth = None depth = None
if use_preview: if use_preview:
for line in stdout.splitlines(): for line in stdout.splitlines():