digitalmars.D.bugs - [Issue 19269] New: Cannot throw C++ exceptions from D
- d-bugmail puremagic.com (25/25) Sep 26 2018 https://issues.dlang.org/show_bug.cgi?id=19269
https://issues.dlang.org/show_bug.cgi?id=19269 Issue ID: 19269 Summary: Cannot throw C++ exceptions from D Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: pro.mathias.lang gmail.com When trying to throw `core.stdcpp.exception : exception` from D (the std::exception definition), DMD complains with: ``` foo.d(2): Error: can only throw class objects derived from Throwable, not type core.stdcpp.exception.std.exception ``` Code to reproduce: ``` import core.stdcpp.exception; void main () { throw new exception(); } ``` --
Sep 26 2018