[C++-sig] register_exception_translator problem in 1.31.0
Dan Halbert
halbert at bbn.com
Wed Mar 3 17:32:59 CET 2004
I am trying to use the exception translator feature stock BPL version
from Boost 1.31.0. My code is like this:
void
translate(My::Own::Exception const &e)
{
PyErr_SetString( ... );
}
BOOST_PYTHON_MODULE(mod)
{
// ...
register_exception_translator<My::Own::Exception>(translate);
}
However, I get a compile error with gcc 3.2.2 on Linux:
../py_my_own.cpp: In function `void init_module_mod()':
../py_my_own.cpp:68: no matching function for call to `
register_exception_translator(void (&)(My::Own::Exception&))'
Studying the BPL include files has gotten me nowhere. Can you tell me
what I'm doing wrong?
Thanks,
Dan
More information about the Cplusplus-sig
mailing list