[C++-sig] Re: exceptions and multiple modules
David Abrahams
dave at boost-consulting.com
Wed Jul 23 03:44:54 CEST 2003
greg Landrum <greglandrum at mindspring.com> writes:
> [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?
Yeah, some. Could you try the enclosed patch and see whether it
helps?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bpl.patch
Type: text/x-patch
Size: 1238 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20030722/e1d5fd8d/attachment.bin>
-------------- next part --------------
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list