[LC++]exceptions out off class

Vincent Penquerc'h Vincent.Penquerch at artworks.co.uk
Mon Jul 15 22:56:05 UTC 2002


>   In the main-programm I then try to catch it. If I just
> catch it like:
> catch (my_exception)
> it works. But if I catch it like:
> catch (my_exception e) OR
> catch (my_exception& e)
> it segfaults.

I'd guess your exception object flies out of scope before
caught. I'm puzzled as to why just naming the exception
would segfault, however.
Try throwing a string, and see if it helps. If it does,
try adding debug traces to the exception class ctors and
dtor, and see what gets called when.

-- 
Vincent Penquerc'h 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/tuxcpprogramming/attachments/20020715/4be39e29/attachment.htm 


More information about the tuxCPProgramming mailing list