|
Boost : |
Subject: Re: [boost] [stacktrace] review (changing vote to NO)
From: Artyom Beilis (artyom.beilis_at_[hidden])
Date: 2016-12-25 10:14:09
>> > Additionally I realized that with_trace and traced aren't parts of the >
>> > library! These should be built in there by default.
>>
>> During the Review I've received multiple requests to embed stacktraces
>> into exceptions. And everyone was requesting to do that in a different way.
>> I've got about 5 different incompatible ways to do that, and everyone thinks
>> that there's only one (or at most 3) right ways to do that.
>
>
> There is one and only one way to do that, and it's to use Boost.Exception.
> That's what it's there for.
>
> Every library defining its own with_foo and with_bar exception wrappers is
> not the way to go.
As long as there is a simple way to throw an exception such that:
1. It is derived from std::exception
2. It contains information about the stack trace
It is ok for me.
But this basic functionality this way or other should be present.
I personally liked with_trace very much as very simple and intuitive,
straight forward and does not require redesign of exception
hierarchy (like I did in cppcms/booster)
> And neither is duplicating the standard exception
> hierarchy as in
>
> https://sourceforge.net/p/cppcms/code/HEAD/tree/framework/trunk/booster/booster/backtrace.h
>
I hadn't told that this is best approach
it just one possible approach that I designed for CppCMS (not boost)
I also hand't submitted it for boost review.
Artyom
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk