|
Boost : |
Subject: Re: [boost] expected/result/etc
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-02-02 19:14:08
On 31/01/2016 03:51, Niall Douglas wrote:
> Something I've always wished for is for std::exception to be able to
> transport one or more stack backtraces. I rolled my own for AFIO v1
> where it captures the stack both inside the engine and the stack
> where end user code called AFIO code (both were always in different
> threads), but it's a lot of code and is not efficient, and sadly will
> not be present in AFIO v2 which is 98% noexcept and single threaded
> throughout.
FWIW, through some compiler-specific chicanery you can recover a stack
trace (for the latest throw site) from any in-flight exception
(including system exceptions such as access violations) in MSVC+Windows
at least. I've found that to be incredibly helpful in the past, even if
only applied to crashes during unit tests. ;)
I haven't checked if it's possible to do something similar in gcc/clang
and/or Linux, but I would hope so.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk