Any way to peek at the exception currently being thrown?

kinke noone at nowhere.com
Thu Jun 17 21:06:50 UTC 2021


On Wednesday, 2 June 2021 at 10:03:56 UTC, Andrei Alexandrescu 
wrote:
> The runtime certainly has that information, so the only matter 
> is exposing it via an API.

Yep. It's probably simply a matter of exposing the Throwable in
* for Posix: 
https://github.com/dlang/druntime/blob/60a214942ae2b88fffd43b0fd3301f1e7ddca02f/src/rt/dwarfeh.d#L149
* for Win64 (DMD; LDC is different): 
https://github.com/dlang/druntime/blob/60a214942ae2b88fffd43b0fd3301f1e7ddca02f/src/rt/deh_win64_posix.d#L100

That probably doesn't account for foreign (C++) exceptions though.


More information about the Digitalmars-d mailing list