D Exceptions
Steve Teale
steve.teale at britseyeview.com
Tue Jan 26 11:37:42 PST 2010
Daniel Keep Wrote:
>
>
> Steve Teale wrote:
> > ...
> >
> > So it seems there is a safety net in Windows, but not in Linux. Is this how it is supposed to be?
>
> Under Windows, access violations cause the OS to throw an exception.
> Since D uses the same EH mechanism as the OS, this integrates nicely.
>
> Under linux, SIGSEGV is a signal, and you can't safely throw exceptions
> from signal handlers, so D just aborts.
>
> As far as I understand it, it's a limitation of the way linux is designed.
Thanks Daniel, now I've had time to get something to eat and a couple of beers, that makes complete sense.
So basically, under Linux, there's not much your program can do to protect itself against errors in library code, right?
I hate signals, particularly when doing multi-threaded stuff.
More information about the Digitalmars-d
mailing list