Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions within .on() blocks are mysteriously ignored #396

Closed
postmodern opened this issue Aug 28, 2023 · 1 comment
Closed

Exceptions within .on() blocks are mysteriously ignored #396

postmodern opened this issue Aug 28, 2023 · 1 comment

Comments

@postmodern
Copy link
Contributor

I noticed that exceptions raised within .on() blocks are mysterious ignored, and not even logged. This makes debugging errors within other code that's called within .on() blocks very difficult.

Example Code

require 'ferrum'

browser = Ferrum::Browser.new
browser.network.intercept
browser.on(:request) do
  raise("error!")
end

browser.go_to('https://example.com')
sleep

Expected Result

An uncaught exception being raised.

Actual Result

Nothing

Version Information

  • ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
  • ferrum (0.13)
@route
Copy link
Member

route commented Aug 28, 2023

I believe it's ruby-concurrency/concurrent-ruby#634 but I never had time to work on it.

route added a commit that referenced this issue Jan 4, 2024
We can easily workaround async with queue and a thread and btw simplify the subscriber. Swallowing errors is not good, closes #396
route added a commit that referenced this issue Jan 4, 2024
We can easily workaround async with queue and a thread and btw simplify the subscriber. Swallowing errors is not good, closes #396
route added a commit that referenced this issue Jan 4, 2024
We can easily workaround async with queue and a thread and btw simplify the subscriber. Swallowing errors is not good, closes #396
@route route closed this as completed in 06bd206 Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants