Bug 19269 – Cannot throw C++ exceptions from D

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-09-26T18:06:46Z
Last change time
2024-12-13T19:00:39Z
Assigned to
No Owner
Creator
Mathias LANG
Moved to GitHub: dmd#19487 →

Comments

Comment #0 by pro.mathias.lang — 2018-09-26T18:06:46Z
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(); } ```
Comment #1 by robert.schadek — 2024-12-13T19:00:39Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19487 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB