translating C++ exceptions to python

calin.hanchevici at gmail.com calin.hanchevici at gmail.com
Mon Jun 13 07:23:03 EDT 2005


Hi all,

I have a C++ library I call from python. The problem is I have c++
exceptions that i want to be translated to python. I want to be able to
do stuff like:
try:
    my_cpp_function()
except cpp_exception_1:
    do_stuff
except cpp_exception_2:
    do_other_stuff

any ideas how can i do the translation?
Thanks, calin




More information about the Python-list mailing list