
On Fri, Aug 1, 2014 at 4:40 AM, Michael Koenig < michael.koenig@blue-yonder.com> wrote:
Hey guys!
Boost.Python throws boost::python::error_already_set exceptions whenever calls to embedding functions such as boost::python::import() or boost::python::exec() fail.
This exception is just an empty class. It does not provide any information on the error which occurred on the Python side. It is not even a standard exception in the C++ sense.
I took a quick look -- if I read the code right, the Boost Python exception types don't even derive from std::exception. I can't think of any reason why that's done, you're right that it should be fixed. Secondly, I suggest using BOOST_THROW_EXCEPTION to throw. This would allow arbitrary information to be attached to the exception object, not only at the throw site but also at a later time. See http://www.boost.org/doc/libs/release/libs/exception/doc/tutorial_transporti... . Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode