September 26, 2018 [Issue 19269] New: Cannot throw C++ exceptions from D | ||||
---|---|---|---|---|
| ||||
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(); } ``` -- |
Copyright © 1999-2021 by the D Language Foundation