WORDS-425 - refactor exception handling in PdfBuilder