Boost logo

Boost :

Subject: Re: [boost] [Stacktrace] review
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2016-12-14 18:44:50

On 12/15/16 02:27, Peter Dimov wrote:
> Nat Goodspeed wrote:
>> ... perhaps even a mechanism to make BOOST_THROW_EXCEPTION embed the
>> stacktrace at the throw point.
> This sounds like a pretty good idea, although I'm not sure if we can
> enable it by default as people have historically been very sensitive to
> changes to BOOST_THROW_EXCEPTION. But an opt-in macro should be fine and
> very useful as one would automatically get stack traces from every use

I've not taken a look at the proposed Stacktrace library, but from what
I know obtaining a stacktrace is typically a rather expensive operation.
I expect it to be no less expensive than throwing the exception. That's
probably too much to pay for by default. Plus, it adds one more
dependency on another library via such a core component as

I think, a new macro in a separate library (i.e. not in throw_exception)
would be more preferable.

Boost list run by bdawes at, gregod at, cpdaniel at, john at