Python 2.2.1 C API - Error Handling

Erik Max Francis max at
Mon Aug 19 20:20:11 EDT 2002

cseymour at wrote:

> We're using Boost (couldn't get any help from their mailing list),
> 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.

Are you letting the exceptions cross shared library/DLL boundaries? 
This is almost always a complete disaster, particluarly with varying

 Erik Max Francis / max at /
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ There is nothing so subject to the inconstancy of fortune as war.
\__/ Miguel de Cervantes
    Church /
 A lambda calculus explorer in Python.

More information about the Python-list mailing list