Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Handle Saxon errors with feedback to client
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-christensen committed Aug 11, 2019
1 parent 8daca6d commit 69997d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import lbp_print.core as lbp_print
import lbp_print.config as lbp_config
from lbp_print.exceptions import SaxonError

lbp_config.cache_dir = "cache"

Expand Down Expand Up @@ -45,7 +46,8 @@ def convert_resource(id: str, resource_type: str) -> str:
update_status(f"Converting resource to pdf.", job)
try:
filename = lbp_print.Tex(trans).process(output_format="pdf")
except:
except SaxonError as exc:
update_status(str(exc), job)
raise

update_status(f"Successfully converted resource {id} to pdf.", job)
Expand Down

0 comments on commit 69997d3

Please sign in to comment.