Better errors on failed squeeze

This commit is contained in:
John Whitington 2014-10-15 13:29:05 +01:00
parent 953cf0acc5
commit 678a25191d
1 changed files with 6 additions and 1 deletions

View File

@ -249,7 +249,12 @@ let squeeze pdf =
Pdfcodec.flate_level := 9;
ignore (recompress_pdf pdf)
with
e -> raise (Pdf.PDFError "Squeeze failed. No output written")
e ->
raise
(Pdf.PDFError
(Printf.sprintf
"Squeeze failed. No output written.\n Proximate error was:\n %s"
(Printexc.to_string e)))
type encoding =
| Raw