Example (failing spec):
it "permits normal handling of errors" do
caught = nil
EM.synchrony do
begin
EM::Synchrony::FiberIterator.new(0..1, 2).each do |num|
raise "#{num} here"
end
rescue => e
caught = e.message
end
EM.stop
end
expect(caught).to eq("0 here")
end
The rescue block is never entered, and the only way to catch the exception is with EM.error_handler or catching it outside of the EM loop. Neither approach is composable.
@igrigorik Any ideas for an easy fix?
Example (failing spec):
The
rescueblock is never entered, and the only way to catch the exception is withEM.error_handleror catching it outside of the EM loop. Neither approach is composable.@igrigorik Any ideas for an easy fix?