|
Boost : |
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2022-02-15 00:42:33
On Mon, Feb 14, 2022 at 3:30 PM Gavin Lambert via Boost <
boost_at_[hidden]> wrote:
>
> On 14/02/2022 18:49, Vinnie Falco wrote:
> > I am less excited about changing the signatures of all public
> > functions. I thought that BOOST_THROW_EXCEPTION attached a stack trace
> > to the exception? Wouldn't that provide the same or more information
> > as BOOST_CURRENT_LOCATION at the user's call site?
>
> Personally, I find passing around source-locations to be completely
> useless (and subject to binary bloat and undesirable disclosure, as
> Niall pointed out). Stack traces all the way.
That's the reason I think that we should keep the ability of all variants
of the throw machinery in Boost to attach arbitrary information to
exceptions: we don't know what user finds which info useful and which info
unacceptable. The boost::exception type itself is designed to add
negligible cost, and if that is not the case, we solve that problem rather
than removing it (currently, the cost is due to support for
boost::exception_ptr, and while I am not convinced that it causes any
practical problems, in the spirit of C++ it should be optimized if C++11 is
available).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk