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:
parent
afc367cfb8
commit
77b0241406
@ -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()
|
||||||
|
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user