Yeah, I was wondering what's the right approach here. Ideally you want to throw and exception and let user know something bad happened, but it looks like Iterator interface doesn't implement this and you can't do it.