|
Boost : |
From: Chad Harrington (harrington_chad_at_[hidden])
Date: 2002-03-28 20:55:34
I recently upgrade my Boost installation from boost_1_24_0 to boost_1_27_0 and found that it broke my Boost Python module. Apparently the the definition of
boost::python::handle_exception has changed:
in 1.24:
void handle_exception()
{
try {
throw;
}
catch(const boost::python::error_already_set&)
{
}
catch(const std::bad_alloc&)
{
PyErr_NoMemory();
}
catch(const std::exception& x)
{
PyErr_SetString(PyExc_RuntimeError, x.what());
}
catch(...)
{
PyErr_SetString(PyExc_RuntimeError, "unidentifiable C++ exception");
}
}
in 1.27:
template <class T>
bool handle_exception(T f)
{
return handle_exception_impl(function0<void>(boost::ref(f)));
}
I am unsure what the template parameter T and argument f should be. It is some sort of function pointer, but I am lost as to what function should be passed in. The example page (which I modeled my module after) has not been updated and still shows handle_exception() with no argument.
Any ideas?
d
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk