How GCC handle exceptions under Linux?

Ian Lance Taylor iant@google.com
Tue Dec 11 20:41:00 GMT 2012


On Tue, Dec 11, 2012 at 10:25 AM, Borneq <borucki.andrzej@gmail.com> wrote:
> Jonathan Wakely-4 wrote
>
> <quote">
> No. Hardware exceptions and signals are not mapped to C++ exceptions.
> C++ exceptions are designed for error handling, not for handling
> asynchronous events like signals.
>
> Is impossible to write safe code handling hardware exceptions by try..catch?

On GNU/Linux and Solaris and possibly other systems, you can write a
signal handler that uses throw.

Ian



More information about the Libstdc++ mailing list