@@ -1470,9 +1470,10 @@ def convert_psfrags(tmpfile, psfrags, font_preamble, custom_preamble,
1470
1470
stdout = fout , stderr = subprocess .STDOUT )
1471
1471
except subprocess .CalledProcessError as exc :
1472
1472
with io .open (outfile , 'rb' ) as fh :
1473
- raise RuntimeError ('LaTeX was not able to process your file: '
1474
- 'Here is the full report generated by LaTeX'
1475
- '\n \n %s' % (fh .read ()))
1473
+ raise RuntimeError ('LaTeX was not able to process the following '
1474
+ 'file:\n %s\n '
1475
+ 'Here is the full report generated by LaTeX:'
1476
+ '%s\n \n ' % (latexfile , fh .read ()))
1476
1477
else :
1477
1478
with io .open (outfile , 'rb' ) as fh :
1478
1479
verbose .report (fh .read (), 'debug' )
@@ -1484,12 +1485,12 @@ def convert_psfrags(tmpfile, psfrags, font_preamble, custom_preamble,
1484
1485
try :
1485
1486
with open (outfile , "w" ) as fout :
1486
1487
subprocess .check_call (command , cwd = tmpdir ,
1487
- stdout = fout , stderr = subprocess .STDOUT )
1488
+ stdout = fout , stderr = subprocess .STDOUT )
1488
1489
except subprocess .CalledProcessError as exc :
1489
1490
with io .open (outfile , 'rb' ) as fh :
1490
1491
raise RuntimeError ('dvips was not able to process the following '
1491
1492
'file:\n %s\n Here is the full report generated '
1492
- 'by dvips: \n \n ' % dvifile + fh .read ())
1493
+ 'by dvips: %s \n \n ' % ( dvifile , fh .read () ))
1493
1494
else :
1494
1495
with io .open (outfile , 'rb' ) as fh :
1495
1496
verbose .report (fh .read (), 'debug' )
0 commit comments