3417 silently handle errors

Move the exception catch closer to error as discussed. Fixes https://github.com/mozilla/pdf.js/issues/3417