druntime function to query whether any exception is "in flight"

Johan j at j.nl
Tue Oct 20 14:56:59 UTC 2020


Hi all,

Weka is using a modified druntime. One of the modifications is 
adding a function that you can use to query whether an exception 
is "in flight"

```
/****************************************
  * Returns true when an exception is "in flight", where "in 
flight"
  * means that an exception has been thrown but has not been 
caught yet.
  *
  * Returns:
  *      true when an exception is "in flight" or not.
  */
extern(C) bool _d_eh_isExceptionInFlight()
```

The function is not exposed to the outside world, but 
knowledgeable coders can access it using an extern(C) forward 
declaration.

Is this generally useful functionality and shall I upstream this 
to druntime? I have not looked at whether this is easy to 
implement for the Windows exception handling.
If not, then I will upstream it to LDC's druntime fork.

thanks,
   Johan



More information about the Digitalmars-d mailing list