15 Feb
2022
15 Feb
'22
1:49 a.m.
Emil Dotchevski wrote:
It is not practical to make all code that deals with Boost exceptions depend on Stacktrace, but is it practical to provide an interface for the user to attach a stack trace, e.g. a callback that takes a boost::exception by reference, and we pass the exception object to it before we throw it?
Even something as trivial as this introduces way too much complexity into what was originally supposed to be a five line utility function to support compilation with exceptions disabled. If we make the handler global, we need atomics. If we make it per-thread, we need thread locals. We can probably do it once we officially switch to C++11 though, so there's that. :-) (Or, of course, only provide it under C++11 and later.)