Good idea. Which exception do you recommend? Is there an accepted practice for this?
–
amarillionFeb 27 '10 at 10:26

1

Hope that helps - you could use an existing RuntimeException subclass like IllegalStateException if you feel it's suitable, I suspect you would want to create your own exception subclass if you wanted to process it further and to make the exception meaningful in the context of your application.
–
BrabsterFeb 27 '10 at 10:34

If the code contains many iterators this might end in banishing checked exceptions. This Java corner seems to be broken by design.
–
cevingJun 25 '13 at 11:08