
"David Abrahams" <dave@boost-consulting.com> wrote in message news:u7jl5riq6.fsf@boost-consulting.com...
"Gennadiy Rozental" <gennadiy.rozental@thomson.com> writes:
I've implemented similar facilities in Boost.Test. Here is how latest (not cometted)version look like (abridged):
Usage look like this:
boost::execution_monitor ex_mon;
ex_mon.register_exception_translator<my_exception>( my_translator );
You didn't show what my_exception looks like.
ex_mon.execute( function_to_monitor );
Isn't it what you are trying to do?
"Trying?" Of course I'm doing something similar, but I'm confused by the question: I was the one who pointed this technique out to you.
I did not have a chance to look in detailed on the code you posted. It just seemed that there maybe something more beyond what I was trying to do. My question was just to clarify the difference. Sorry for confusion.
Surely you grabbed most of your code out of Boost.Python (?)
I did not grap the code I just followed the discussion we had at the time.
Anyway, the point of my exercise was to extract the mechanism into an easy-to-use general-purpose library with as little overhead as possible (e.g. no dynamic allocations are forced). If we still think there's a point in having such a general library (at least in detail), your particular interface choices could be implemented on top of it.
I wil need to look in more detailes. I could be not trivial. Also I couldn't afford all the dependencies you introduced. Gennadiy
-- Dave Abrahams Boost Consulting www.boost-consulting.com