Test for errors in .Contains() and .NextPath()

This commit is contained in:
Andrew Dunham 2015-04-15 15:28:46 -07:00
parent 7de923d40a
commit 430ff507f0
8 changed files with 71 additions and 11 deletions

View file

@ -193,11 +193,16 @@ func (it *HasA) NextPath() bool {
if it.primaryIt.NextPath() {
return true
}
result := it.NextContains()
glog.V(4).Infoln("HASA", it.UID(), "NextPath Returns", result, "")
if err := it.primaryIt.Err(); err != nil {
it.err = err
return false
}
result := it.NextContains() // Sets it.err if there's an error
if it.err != nil {
return false
}
glog.V(4).Infoln("HASA", it.UID(), "NextPath Returns", result, "")
return result
}