
11 Jun
2008
11 Jun
'08
3:33 a.m.
Stefan Seefeld <seefeld <at> sympatico.ca> writes:
Gennadiy Rozental wrote:
This code causes an exception being thrown to stop iteration. I just wonder if there is means to avoid it.
Out of curiosity, what's the problem with code throwing an exception, as long as it is properly caught ?
In general? Setting aside potential performance consequences, exceptions have to be used only to report error conditions, not as end of loop indicator.
User's shouldn't even have to be aware of that.
Users like me unfortunately become very aware of it. Gennadiy