
3 Oct
2007
3 Oct
'07
2:43 a.m.
[snip]
[snip]
You can not use global storage for the data that's stored in exception objects because in general, multiple exception objects can be active at the same time (this has nothing to do with boost::exception, it's just the way exceptions are defined in C++.)
Can't a std::vector<std::pair<void*, infos> > be used?
That's a big can of worms... You'd have to maintain the lifetime of the infos manually. Why do you want to make the infos global anyway? After all, their lifetime should be identical to the lifetime of the exception object itself; the easiest way to accomplish this is to use a member of the exception object to store the info. Emil Dotchevski