We should have a function that allows you to see if there are exceptions currently in flight.
Brought this up at DConf and Andrei suggested that it should be a runtime function and that we might already have a lot of the machinery to make this happen. He also referenced what C++ is working on for this: http://en.cppreference.com/w/cpp/error/uncaught_exception
An example:
struct Foo {
~this() {
if (we_are_unwinding_due_to_an_exception) {
logSomeStuff();
}
}
}
Comment #1 by robert.schadek — 2024-12-07T13:35:20Z