On 12 November 2015 at 09:59, Jacob Carlborg via Digitalmars-d <digitalmars-d@puremagic.com> wrote:
On 2015-11-12 07:50, Walter Bright wrote:

3. Be able to catch in D code an std::exception* or a C++ class derived
from that.

In would be nice if we were able to catch Objective-C exceptions as well (it uses the same exception handling as C++). They have their own tree of exception classes which do not inherit from std::exception. We don't need to support this right away but it would be nice to avoid any artificial limitations preventing this.

--
/Jacob Carlborg


C++ can catch exceptions thrown in D and ObjC using `catch(...)`, and there's no technical limitation on why we can't do the same from a D `catch { }`.  But I don't think Walter wants C++-style catch-all support in D, and currently our version of catch-all is lowered to `catch(Throwable)` which does not have the same semantic meaning.

--
Regards
Iain