Hi,

> We could change the behaviour of the iterator to throw a 
> NoSuchElementException.
> That's an exception already declared on nextNode().

What about a new JackrabbitRuntimeException? NoSuchElementException is
a RuntimeException as well. NoSuchElementException means "the
iteration has no more elements", and is thrown if next() was called
too many times. I prefer fewer exception classes, but in this case
reusing NoSuchElementException doesn't feel right (to me), because the
same exception is thrown for a common user error (not calling or
ignoring hasNext()), and internal problems like dropped connections.

Thomas

Reply via email to