I think you're imposing your own experience on the question.
Admittedly, I am using my own experience on the question. Without the experience, I would have had the common decency to remain quiet on the issue.
Reaching the "end node" is an exceptional case.
An exceptional case that happens with every run can hardly be called exceptional.
It is clear from the discussion that I'm not alone in viewing this as a normal use of exceptions.
Nor am I alone. I don't know what the best solution is--I'm not sufficiently familiar with the OP's problem. Maybe it's not a common need and shouldn't be part of the algorithm. Maybe making it part of the algorithm would slow it down too much to be effective. Maybe exceptions are the best way to handle this in light of everything else. What I do know, as constrained by my experience, is that exceptions are not usually used in this manner. It's different and a bit "tricky", but it produces the results you need. This type of reasoning, in my experience, is best met with suspicion, and should be approached in full awareness of the issues. That doesn't make it wrong. Jeff -----Original Message----- From: Steve M. Robbins [mailto:steven.robbins@videotron.ca] Sent: Thursday, September 19, 2002 11:39 AM To: Boost-Users@yahoogroups.com Subject: Re: [Boost-Users] Re: [BGL] Best way to abort an algorithm from withi n a visitor? 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 Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/