cotag / libcouchbase

libcouchbase ruby FFI with libuv integration
Other
11 stars 8 forks source link

Handle Exceptions inside view iterator #11

Open PascalTurbo opened 6 years ago

PascalTurbo commented 6 years ago

I'm iterating over the results of a view and I need exceptions to be raised inside the iterator.

From the view example:

res.each do |row|
    # Returns extended results by default
    raise StandardError
end

raise StandardError will stop the iterator and hang the whole application in a useless state.

stakach commented 6 years ago

This is something that is handled: https://github.com/cotag/libcouchbase/blob/master/spec/view_spec.rb#L50

Of course there could be something else going wrong in the library.

stakach commented 6 years ago

Actually you are probably correct looking at travis. I'll resolve asap.

stakach commented 6 years ago

So I have travis running specs again and have this gem running at multiple sites in production without experiencing the described error and can't reproduce locally. Happy to help in anyway I can and if it is something you can reproduce locally it would be great if you could maybe put in some extra debugging output so we can work out what's going wrong and where.