NielsSteensma / Dhalang

Generate PDFs and make screenshots of HTML using Puppeteer in Ruby
MIT License
40 stars 22 forks source link

No feedback on navigation timeout #24

Closed brianlow closed 3 years ago

brianlow commented 3 years ago

Steps to reproduce

> res = Dhalang::PDF.get_from_url("https://www.google.com", navigation_timeout: 1);
Navigation timeout of 1 ms exceeded

> res
=> ""

I expected a Ruby exception to be raised. Something like DhalangException.new("Navigation timeout of 1 ms exceeded")

Is this reasonable? Open to PR?

NielsSteensma commented 3 years ago

Hi.

This does seem reasonable indeed. Thank you for creating a PR for it. I will check/merge it during the weekend