Python 2.2.1 C API - Error Handling

David Abrahams david.abrahams at rcn.com
Mon Aug 19 20:07:09 EDT 2002


<cseymour at thrush.eos.ubc.ca> wrote in message
news:kvwuqmtpsd.fsf at thrush.eos.ubc.ca...
> Hi,
>
> We have some extension modules that worked with Python 2.1, but now
> that we use Python 2.2.1 they crash whenever a PyErr is thrown.
>
> We're using Boost (couldn't get any help from their mailing list),

Never saw your posting. Try C++-sig at python.org instead, though: that's more
Boost.Python specific

> with the usual Boost module setup, where there's a try for the module
> builder stuff, and a catch afterwards which runs
> Boost's handle_exception() function, which causes Python errors. In
> Python 2.1, whenever we throw an error, it is caught by this "catch(...)"
> clause, and an error is raised inside Python. In
> Python 2.2.1, the catch seems to be completely skipped and we get a seg
> fault. I have seen this same behaviour in multiple extension modules.

What is your compiler and platform? Did you switch compiler versions between
2.1 and 2.2.1?

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave at boost-consulting.com * http://www.boost-consulting.com






More information about the Python-list mailing list