[C++-sig] exceptions and multiple modules

greg Landrum greglandrum at mindspring.com
Wed Jul 23 03:22:36 CEST 2003

[boost 1.30, g++ 3.2, redhat 8.0, python 2.2]

We've been having strange order dependence problems when using exceptions 
and multiple extension modules.  I've attached an extremely simplified 
example that demonstrates the problem.

The example includes two small extension modules, moda and modb, each of 
which defines a single function that throws an IndexError.  If I do:
 >>> import modb
 >>> import moda
 >>> modb.tossitb()
everything works fine (I get the expected IndexError)

If, however, I reverse the import error:
 >>> import moda
 >>> import modb
 >>> modb.tossitb()
I get the dreaded "RuntimeError: unidentifiable C++ exception"

Any ideas as to what might be going on here?

"Jamsegment" includes the lines I added to the $Boost/libs/python/test 
Jamfile to build things.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross_mod_problems.zip
Type: application/zip
Size: 1024 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20030722/b0c719ca/attachment.zip>

More information about the Cplusplus-sig mailing list