How D intercepts runtime errors

Serg Kovrov user at domain.invalid
Fri Jul 28 02:08:40 PDT 2006


Thanks for reply, Jarrett. It is exactly what I wondering about.

* Jarrett Billingsley:
> D, as well as most modern C++ implementations, use the underlying OS's 
> exception handling mechanisms; on Windows, it's Structured Exception 
> Handling (SEH), and on *nix, it's usually signals.  I'm just going to 
> discuss SEH, as I don't know much about *nix signals, but I'd assume they 
> are fairly similar.

Yes, I see microsoft c++ compiler has nonstandard keywords to support 
SEH - __try and __except. But i do not have one right now to try it out. 
In mingw/GCC's c++ compiler, on the other hand, there is no support 
(yet, I hope) for it.

Need to say I haven't tried other c++ compilers, but GDC do not support 
it either. And this is really sad.

Is it D language feature, or Digital Mars D compiler? Is such 
functionality part of a language standard or standard library? It would 
be nice if on all compiler implementations one could expect same behavior.



More information about the Digitalmars-d mailing list