Raise an error if cursor returns $err.
This commit is contained in:
parent
6c481c617d
commit
f961339cf5
|
@ -39,7 +39,9 @@ module XGen
|
||||||
|
|
||||||
def next_object
|
def next_object
|
||||||
refill_via_get_more if num_remaining == 0
|
refill_via_get_more if num_remaining == 0
|
||||||
@objects.shift
|
o = @objects.shift
|
||||||
|
raise o['$err'] if o['$err']
|
||||||
|
o
|
||||||
end
|
end
|
||||||
|
|
||||||
def each
|
def each
|
||||||
|
|
Loading…
Reference in New Issue