Catch another PDF error

pull/11/head
Nemo 2020-04-05 02:14:50 +05:30
parent aec6d853b3
commit 1d95cce3f8
1 changed files with 4 additions and 1 deletions

View File

@ -49,7 +49,10 @@ module Muse::Dl
if /html/.match content_type
puts response
response.body_io.each_line do |line|
if /Unable to construct chapter PDF/.match line
# https://muse.jhu.edu/chapter/2383438/pdf
# https://muse.jhu.edu/book/67393
# Errors are Unable to determine page runs / Unable to construct chapter PDF
if /Unable to/.match line
raise Muse::Dl::Errors::MuseCorruptPDF.new
end
end