[C++-sig] Re: Custom Exception objects

Mike Rovner mrovner at propel.com
Mon Nov 8 19:09:36 CET 2004


John A Meinel wrote:
> Basically, the object has to be a global since the translate function 
> needs access to it.

I'm not sure what are you asking. Let's return to basic.

a. If you have C++ exception that you need to register_exception_translator.

b. If you want to expose your exception, you wrap it in a class_.

c. Scope rules are basically normal python rules: in order to use 
exception you need to have in in your local or global namespace.

Combining all three you example is a possible implementation.

Best,
Mike




More information about the Cplusplus-sig mailing list