home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.std.c++
- Path: sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!marlin.jcu.edu.au!coral.cs.jcu.edu.au!spuler
- From: spuler@coral.cs.jcu.edu.au (David Spuler)
- Subject: exceptions, unexpected() and muddle_on()
- Message-ID: <spuler.724363604@coral>
- Sender: news@marlin.jcu.edu.au (USENET News System)
- Organization: James Cook University
- Date: 14 Dec 92 20:06:44 GMT
- Lines: 23
-
-
- On page 320, Stroustrup, 2nd edition, declares the function
-
- void muddle_on() { cerr << "muddling on\n"; }
-
- and installs it so as to be called by unexpected().
-
- My question is: what happens if a function installed by set_unexpected returns?
- Stroustrup says
-
- "This will cause a normal return from a function detecting an unexpected
- exception. .... "
-
- I don't see how this can happen.
- Does the throw expression return and execution continue from there??
- (Seems not since this could be way down deep in the stack.)
- Or does the function which raised the unexpected exception just return with a
- garbage return value?
-
- The ARM seems to have nothing to say about set_unexpected functions returning.
-
- Any insight appreciated,
- David Spuler
-