From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-06-10 23:33:07
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk