I need a class to navigate across a collection, then I implemented Iterator interface. But the problem is, my implementation of next() method need to throw an Exception, because the collection members need to be generated dynamically, and Exceptions may happen during the generating process.
The only exception throws by next() is NoSuchElementException which means no more element in the collection, and this does not meet my need.
Or, I should not implement Iterator at all?