Subject: Re: [boost] [Stacktrace] review
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2016-12-14 21:14:46
On Wed, Dec 14, 2016 at 6:01 PM, Gavin Lambert <gavinl_at_[hidden]>
> On 15/12/2016 12:44, Andrey Semashev wrote:
>> On 12/15/16 02:27, Peter Dimov wrote:
>>> 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
>>> of BOOST_THROW_EXCEPTION. Hello Java.
>> 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
> Capturing the stack to later perform a trace is relatively cheap and fast
> (though perhaps memory wasteful, though you usually wouldn't care about
> that unless the exception was due to running out of memory).
This is not a concern. Throwing any exception type may result in throwing
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk