1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2024-11-26 18:37:12 +00:00

Log TeX error directly

This commit is contained in:
Yohann D'ANELLO 2020-09-05 09:00:16 +02:00
parent afc367cfb8
commit 77b0241406
2 changed files with 6 additions and 2 deletions

View File

@ -217,7 +217,9 @@ class InvoiceRenderView(LoginRequiredMixin, View):
).wait() ).wait()
if error: if error:
raise IOError("An error attempted while generating a invoice (code=" + str(error) + ")") with open("{}/invoice-{:d}.log".format(tmp_dir, pk), "r") as f:
log = f.read()
raise IOError("An error attempted while generating a invoice (code=" + str(error) + ")\n\n" + log)
# Display the generated pdf as a HTTP Response # Display the generated pdf as a HTTP Response
pdf = open("{}/invoice-{}.pdf".format(tmp_dir, pk), 'rb').read() pdf = open("{}/invoice-{}.pdf".format(tmp_dir, pk), 'rb').read()

View File

@ -1110,7 +1110,9 @@ class MemberListRenderView(LoginRequiredMixin, View):
).wait() ).wait()
if error: if error:
raise IOError("An error attempted while generating a WEI list (code=" + str(error) + ")") with open("{}/wei-list.log".format(tmp_dir), "r") as f:
log = f.read()
raise IOError("An error attempted while generating a WEI list (code=" + str(error) + ")\n\n" + log)
# Display the generated pdf as a HTTP Response # Display the generated pdf as a HTTP Response
with open("{}/wei-list.pdf".format(tmp_dir), 'rb') as f: with open("{}/wei-list.pdf".format(tmp_dir), 'rb') as f: