On 15 Dec 2016 at 16:00, Emil Dotchevski wrote:
Do you mean a run-time hook or a compile-time hook?
I think this should be compile-time hook in order to avoid the perils of dynamic initialization in complex multi-thread programs. But we already have that compile-time hook, it's called boost::throw_exception.
Firstly thanks to all for the detailed discussion. Bringing it back to the review of Stacktrace which this is (and not of Exception, another discussion thread would suit that), I am seeing the following options proposed for Stacktrace: Option 1: That Stacktrace implement a macro like BOOST_STACKTRACE_THROW_EXCEPTION() which reimplements BOOST_THROW_EXCEPTION() but with muxed in stacktrace. Option 2: That Stacktrace optionally hook some compile time hook in Boost.Exception to mux in stacktrace. Option 3: That Stacktrace optionally hook some runtime hook in Boost.Exception to mux in stacktrace. Implied in all the above is that the exception type stacktrace mux in framework as described in the current Stacktrace docs is considered bad form and should be deleted? Can people interested vote on one of the options above, or propose their own option, and say whether they want the documented mux in mechanism removed or not? Thanks, Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/