[C++-sig] RuntimeError: unidentifiable C++ exception

Roman Yakovenko roman.yakovenko at gmail.com
Wed Aug 30 13:10:36 CEST 2006


On 8/30/06, Qun Cao <quncao at gmail.com> wrote:
> Hi Everyone,
>
> I created a simple class wrapper like this
>
> BOOST_PYTHON_MODULE(PythonTest) {
>         class_<MyClass,boost::noncopyable>("pMyClass", init<char const*>());
> }
>
> When I try to initialize pMyClass in python, I got this error:
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> RuntimeError: unidentifiable C++ exception

The code generated by Py++ just works, may be you missed something?
You can try to use make_consructor function:

http://boost.org/libs/python/doc/v2/make_function.html#make_constructor-spec

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list