|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2022-02-15 01:49:58
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.)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk