Topic: What can an unexpected_handler do?
Author: bradds@concentric.net (Bradd W. Szonye)
Date: 1996/10/11 Raw View
J. Kanze <kanze@gabi-soft.fr> wrote in article
<m3k9sznsam.fsf_-_@gabi-soft.fr>...
> andrewb@graphsoft.com (Andrew C. Bell) writes:
> To bring this thread back on a standardization topic:-), this is a good
> suggestion, but exactly what library functions can legally be called in
> a new_handler?
Any re-entrant library function <wink>.
I also wonder what exactly you can do in an unexpected_handler. The
standard explicitly lists things you can do in such a function; calling a
function is not one of them. Is that implicitly well-defined behavior, or
is it implicitly undefined behavior? I've been trying to get an answer to
this question for a long time.
The reason it concerns me is the behavior of a thrown exception from an
unexpected_handler. If the unexpected handler itself does not allow the
exception in its specification (or similarly for a function it calls, if
that is legal), what happens? Does the mechanism call terminate()
immediately, or does it thrash and recurse endlessly first? I'd prefer the
former behavior, but I can't find any explicit verbiage to support it.
--
Bradd W. Szonye
bradds@concentric.net
http://www.concentric.net/~bradds
---
[ comp.std.c++ is moderated. To submit articles: Try just posting with your
newsreader. If that fails, use mailto:std-c++@ncar.ucar.edu
comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
Comments? mailto:std-c++-request@ncar.ucar.edu
]