[C++-sig] boost.python changes C++ try/catch behavior?

Mark Ivey zovirl1 at sbcglobal.net
Thu Jan 18 17:17:41 CET 2007

On Jan 18, 2007, at 7:46 AM, Stefan Seefeld wrote:

> Mark Ivey wrote:
>> On Jan 17, 2007, at 9:26 PM, Roman Yakovenko wrote:
>>> setdlopenflags function belongs to sys module. I think this should
>>> solve your problem.
>> Yes, it did.  Thanks!  Is there a reason this isn't the default?
>> i.e. are the times when it wouldn't be appropriate to set those  
>> flags?
> Using RTLD_GLOBAL is generally a bad idea in the context of plugins,
> because it may break the integrity of a plugin. If two plugins both
> define and refer to the symbol 'foo', they will, once loaded, only
> see one of the two (since it will 'override' the other).
> Typically symbols should be private to a plugin. However, in some  
> cases
> not being able to share data (such as typeinfo objects) across plugins
> creates a problem, e.g. because, as in your case, an exception thrown
> in one plugin isn't catchable in another.

Ok.  I think I'll need to read up on this a little bit more then.   

> (By the way, on IRC you mentioned the throw and the catch appear  
> within
> the same function, which let me to believe it had to be some other  
> problem.)

I meant the catch was in the C++ function, as opposed to being back  
in the python code.  The way I said it was misleading though, sorry.

-Mark Ivey-

More information about the Cplusplus-sig mailing list