/python: Raising a exception from boost
chris liechti
cliechti at no.spam.gmx.net
Thu Sep 27 14:23:19 EDT 2001
" Kerim Borchaev ( WarKiD ) " <warkid at storm.ru> wrote in
news:mailman.1001597310.22340.python-list at python.org:
> Is there a way to raise a python exception from a "boosted" extension?
> Because when I do something like this :
>
> throw PyExc_AttributeError
>
> boost handles it and re-throws as "RuntimeError: unidentifiable C++
> exception".
>
> Best regards,
> Kerim mailto:warkid at storm.ru
>
seems to me that you could use
PyErr_Restore (PyObject *type, PyObject *value, PyObject *traceback)
or other functions that are described in
/Python20/Doc/api/exceptionHandling.html: "4. Exception Handling"
--
chris <cliechti at gmx.net>
More information about the Python-list
mailing list