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

Roman Yakovenko roman.yakovenko at gmail.com
Wed Aug 30 21:44:31 CEST 2006


On 8/30/06, Qun Cao <quncao at alumni.usc.edu> wrote:
> Hi Roman,
> What do you mean by "the code generated by Py++ just works"?  Do you mean
> you created a class
> MyClass {
> public:
>    MyClass(char const*) ;
> }
> and you had successfully initialized it in Python?  I tried a similar
> example class and had no problem with it.

That what you described :-).

> The real problem  I had was with this specific class NiString in Gamebryo
> game engine, is it possible that something
> going on inside Gamebryo might cause the problem?  Or the game engine is
> irrelevant to this problem?

I think that NiString is relevant. Take a look on this FAQ:
http://www.boost.org/libs/python/doc/v2/faq.html#custom_string

> And still, what the "unidentifiable C++ exception" is really saying?

Boost.Python has next code:

try{
    run you C++ code
}
catch( registered exceptions ){
     convert them to Python exception
}
catch( ... ){
    throw Python RuntimeError( "unidentifiable C++ exception" )
}

So or you forgot to register your exception or ... something really
bad happened.

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



More information about the Cplusplus-sig mailing list