druntime function to query whether any exception is "in flight"
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.com
Tue Oct 20 17:45:19 UTC 2020
On 10/20/20 11:23 AM, Adam D. Ruppe wrote:
> On Tuesday, 20 October 2020 at 15:16:33 UTC, Andrei Alexandrescu wrote:
>> One change please - can you have it return the current exception as a
>> Throwable (and null if no exception in flight)?
>
>
> and prolly at least document that it shouldn't let the reference escape
> cuz otherwise it complicates memory freeing of the exception.
>
> basically it would be a borrowed reference. again at least just
> documented, not necessarily enforced, but people should be aware
> escaping it is UB.
Nice.
extern(C) scope(Throwable) _d_eh_getExceptionInFlight();
More information about the Digitalmars-d
mailing list