
On Sat, May 28, 2011 at 6:27 PM, Mostafa
Though, http://www.boost.org/doc/libs/1_46_1/libs/exception/doc/enable_current_excep... states:
Note: Instead of using the throw keyword directly, it is preferable to call boost::throw_exception. This is guaranteed to throw an exception that derives from boost::exception and supports the exception_ptr functionality.
And it's not very clear what exactly are the requirements for supporting exception_ptr functionality if one doesn't derive from boost::exception.
If you want to use the error info or exception_ptr functionality, the exception being thrown must derive from boost::exception. If you pass an exception object of type T that doesn't derive from boost::exception to boost::throw_exception, it copies it into an object that derives from both boost::exception and T, and throws that object. Or you can use the BOOST_THROW_EXCEPTION macro which in addition will store __FILE__ and __LINE__ in the exception object, giving you more useful boost::diagnostic_information. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode