bitcrowd / chromic_pdf

Convenient HTML to PDF/A rendering library for Elixir based on Chrome & Ghostscript
Apache License 2.0
409 stars 37 forks source link

Add :raise_on_unhandled_runtime_exceptions option #238

Closed maltoe closed 1 year ago

maltoe commented 1 year ago

This patch adds the :unhandled_runtime_exceptions option that allows to configure sessions to raise a ChromeError when Chrome sends us a Runtime.exceptionThrown notification.

Relates to #237

maltoe commented 1 year ago

@andreasknoepfle I've changed this PR around a lot now. New behaviour is "log by default, ignore or raise as option". For this I needed to change a couple things: 1) In the SessionPool, we need to keep the global args around and merge them into the job args, 2) the protocol matcher functions need a way to say "match, but don't remove me" as otherwise the log statement would happen multiple times.

Wdyt?