You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E, [2021-09-10T12:59:43.731341 #386] ERROR -- : Exception rescued in _process_changes:
RuntimeError:
(pry):3:in `block in <main>'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/event/config.rb:28:in `call'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/event/processor.rb:117:in `block in _process_changes'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/thread.rb:26:in `rescue_and_log'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/event/processor.rb:116:in `_process_changes'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/event/processor.rb:25:in `block in loop_for'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/event/processor.rb:20:in `loop'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/event/processor.rb:20:in `loop_for'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/event/loop.rb:85:in `_process_changes'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/event/loop.rb:51:in `block in start'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/thread.rb:26:in `rescue_and_log'
/usr/local/bundle/gems/listen-3.7.0/lib/listen/thread.rb:18:in `block in new'
I need to catch the exception the listen block raises, so I can safely stop the main thread, but it seems the runtime error is not rescuable as above. (not going through puts "rescued #{ex.message}" part)
I tried this #362 (comment)Thread.main.wakeup but it's only good when the main thread is sleeping. (if it's blocking by file access or whatnot, it doesn't work)
The text was updated successfully, but these errors were encountered:
One idea I'm considering is to make listen work optionally with the escalate gem. That gem provides a hook for escalating exceptions. I wouldn't want to have a hard dependency, but perhaps if it's been required by the time the listen code is running, it could use that hook.
@github0013 What do you think? If you could register an escalate callback to intercept these exceptions, would that do what you need?
I checked the issues, and I found this #535 . It should be the same error?
Environments
Reproduction
Let this run.
Then touch a file.
And I get this in the console.
I need to catch the exception the listen block raises, so I can safely stop the main thread, but it seems the runtime error is not rescuable as above. (not going through
puts "rescued #{ex.message}"
part)I tried this #362 (comment)
Thread.main.wakeup
but it's only good when the main thread is sleeping. (if it's blocking by file access or whatnot, it doesn't work)The text was updated successfully, but these errors were encountered: