[C++-sig] Exception translation to python classes

Niall Douglas s_sourceforge at nedprod.com
Sun Sep 21 04:25:46 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(Wow, I really have made a lot of posts today, but I guess that's the 
result of actual progress for the first time in a month)

I was wondering if anyone had any experience or could point me to 
some example code for translating C++ exceptions by using 
PyErr_SetObject to the Boost.Python wrap of the appropriate C++ 
exception object.

Would it be as simple as creating the python version and calling 
operator=? If so then this is actually quite hard for me as I've not 
use the python C interface before. Also you'd need to ask 
Boost.Python what python type corresponds to the exception type and I 
can't see docs for that call?

Cheers,
Niall





-----BEGIN PGP SIGNATURE-----
Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2

iQA/AwUBP20MKsEcvDLFGKbPEQLpSgCeMS5o8ThOzOAD1YUy5P0SweSmx1sAoNSE
eUOVqfUE5TbnQQuRiRxsCeKc
=EZ0j
-----END PGP SIGNATURE-----




More information about the Cplusplus-sig mailing list