
28 Sep
2007
28 Sep
'07
6:35 p.m.
The library provides the macro BOOST_ERROR_INFO. Is it possible to modify the macro in such a way that successive calls of BOOST_ERROR_INFO would add the date in a list? This could be used in order to get infos which parts of the code catched the exception.
Yes, I guess that's possible, but I think that what contexts catch (add BOOST_ERROR_INFO) and rethrow is less useful information than, for example, the caller stack at the time the exception was first thrown -- which is the type of info BOOST_ERROR_INFO is designed to stuff in exceptions. OTOH, if there is a way to detect a catch _automagically_, I suppose recording each catch in the exception object would be a good thing. Emil Dotchevski