help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Catching Runtime Exceptions


From: Rolf Magnus
Subject: Re: Catching Runtime Exceptions
Date: Mon, 10 May 2004 10:31:45 +0200

Kutty Banerjee wrote:

> Hi,
>  Is it possible using g++ under LINUX to catch segmentation faults,
>  access violation, other OS exceptions by using catch(...) ?

Those are not exceptions, those are Un*x signals. Use a signal handler
instead.

>  I know that MS VC++ has a mechanism whereby the above exceptions are
>  called structured exceptions and can be caught not classified t
>  hough, using catch(...) .

I wonder how that works. I mean, you can get a segfault before main() or
after it. How would you catch those?

>  was curious if there is something similar using G++.

Similar in the sense that you can handle such events, yes. Similar in
the sense that you get them as exceptions, no.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]