|
Boost Users : |
From: Steve M. Robbins (steven.robbins_at_[hidden])
Date: 2002-09-19 13:38:34
On Thu, Sep 19, 2002 at 11:04:12AM -0700, Jeff Faust wrote:
> > > Exceptions are meant for exceptional cases. [...]
> >
> > Define "exceptional cases". How exceptions work is well defined, and
> > therefore can be understood, whereas an "exceptional case" is always
> > assumed to be intuitively obvious.
>
> Something unexpected. The example give by the original poster is describing
> a normal execution. This is not unexpected. It's strange to think that
> what occurs in the catch block is not error recover/reporting, but normal
> and expected execution. This is not an obvious usage of exceptions.
I think you're imposing your own experience on the question. In the
case at hand, using an exception seemed perfectly natural to *me*, for
all the reasons that Jeremy just outlined. It is clear from the discussion
that I'm not alone in viewing this as a normal use of exceptions.
Think of it this way: the normal course of action for a "visitor" is
to process a node. Reaching the "end node" is an exceptional case.
-Steve
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net