Boost logo

Boost :

Subject: Re: [boost] [Stacktrace] review
From: Peter Dimov (lists_at_[hidden])
Date: 2016-12-14 18:27:15


Nat Goodspeed wrote:
> There's a documentation section "Exceptions with stacktrace" that
> discusses techniques for incorporating stacktrace data into your own
> exceptions. I see a real possibility for integration with Boost.Exception,
> ...

Yes, this jumped out at me too. The whole point of Boost.Exception is to
carry arbitrary data along with the exception, so an example that uses
Boost.Exception instead of the custom 'traced' type should be given.

> ... 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 of
BOOST_THROW_EXCEPTION. Hello Java.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk