Re: [C++-sig] Handling a custom C++ exception from Python

2013-06-02 Thread Alex Leach
On Sun, 02 Jun 2013 21:04:51 +0100, Александров Петр wrote: 02.06.2013 13:14, Alex Leach пишет: 1. Boost Python has a dedicated exception handling API[1] that doesn't require you to wrap the exception in a class_<> template. The class_ template is a bit heavy duty for registering except

Re: [C++-sig] Handling a custom C++ exception from Python

2013-06-02 Thread Alex Leach
On Sat, 01 Jun 2013 23:50:40 +0100, Александров Петр wrote: I want to catch a custom C++ exception in Python. I have described my custom exception class as usual: class_(...); and created a translator: void translate(CMyException const &e) { object o(e); PyErr_SetObject(PyExc_E