[lug] g++ signals and exceptions question
Jonathan Briggs
zlynx at acm.org
Wed May 15 13:51:43 MDT 2002
On Wed, 2002-05-15 at 13:21, Tkil wrote:
> If you could do this, how far did you get in do_stuff() when the
> exception occurs? How do you know to save your current state?
Just like with other exceptions, I would have exception handlers deeper
in the code if there was a section that needed to exit with a known
state.
I found an interesting thread in the Sun forums:
http://forum.sun.com/thread.jsp?forum=5&thread=3466
Apparently the Sun C++ compiler does support throwing exceptions from
signal handlers (unofficially and unsupportedly). So now I know that at
least some other people have had the same idea (and for the same
reasons, it sounds like.).
I will probably just check global flags for now. That seems like much
less work than adding multiple threads to a program that currently
doesn't use them.
--
Jonathan Briggs
jbriggs at esoft.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 232 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20020515/6550095a/attachment.pgp>
More information about the LUG
mailing list