C++ Exceptions in Python extensions

eric jones eric at enthought.com
Thu Jan 17 12:15:04 EST 2002


Hey group,

> [Problem with C++ exceptions in weave extension modules with gcc on
Mandrake.]

Thanks for your suggestions.  An off line discussion with Gordon McMillan
solved the problem.  It is definitely a compiler error probably exacerbated
by the fact that Python is linked with gcc and my extensions with g++.

After somewhat random attempts to get around the problem, I've ended up
making any function that is called from an extension function and can throw
an exception into a class method.  As Gordon pointed out, this is a "Java"
fix.

I'm not to excited about the solution, but it didn't break any other
platforms, so we'll stick with it until this common bug goes away (couple of
years or so???)

see ya,
eric






More information about the Python-list mailing list