Use C++ exception model in D

David Nadlinger code at klickverbot.at
Wed Apr 9 10:27:55 PDT 2014


On Wednesday, 9 April 2014 at 16:48:54 UTC, Jacob Carlborg wrote:
> x86_64 yes, not necessarily only for DMD. I thought if DMD, LDC 
> and GDC all used the same exception handling model and the same 
> as C++ it would be easier. Especially for implementing support 
> for Objective-C exceptions, which is why initially started this 
> thread.

They don't. GDC and LDC use libunwind, whereas DMD uses its own 
custom EH implementation.

With GDC and LDC, you'd just need to add your code to handle 
Objective-C exceptions to the personality functions. libunwind 
exceptions have a "type"/"source language" field, and by default 
most implementations either ignore unknown exception types or 
abort on encountering them.

David


More information about the Digitalmars-d mailing list