Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/jobs/generate_pdf_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ def perform(parent_object, current_batch_process = parent_object.current_batch_p
parent_object.current_batch_connection = current_batch_connection
parent_object.generate_pdf
parent_object.processing_event("PDF has been generated", "pdf-generated")
rescue RuntimeError => e
if e.message.include?("Can not read scanlines from a tiled image")
parent_object.processing_event("Unable to generate PDF: source image is in tiled format and cannot be processed.", "pdf-generation-failed")
else
parent_object.processing_event("Unable to generate PDF, #{e.message}", "failed")
raise
end
rescue => e
parent_object.processing_event("Unable to generate PDF, #{e.message}", "failed")
raise
Expand Down