Thread: Sdk
View Single Post
Old 05-24-2011, 08:46 AM
farshizzo farshizzo is offline
WorldViz Team Member
Join Date: Mar 2003
Posts: 2,849
Originally Posted by dcnieho View Post
Is this supposed to be
std::list< osg::ref_ptr< MySensor > > m_sensors;
instead? I don't seem to have a viz::ref_ptr (but do have a viz::Referenced*). In any case, things seem to work fine with osg::ref_ptr
The viz::ref_ptr usage was intentional. You need to #include <viz/ref_ptr> which should come with the SDK.

Originally Posted by dcnieho View Post
Other things I tried:
- doing data.set( PYTHON_RETURN_OBJECT, PYTHON_INT(-1)); or data.set(PYTHON_RETURN_OBJECT, NULL); after the call to PyErr_SetString did not help (inspired by some reading of how error states should be communicated from Python).
- try/except around the call where the exception is raised. This didn't do anything, as expected when the exception goes unnoticed.

What am I missing? Thanks for your help!
You should have to set NULL as the return object. However, I just noticed that Vizard is eating up the exception if NULL is returned by the plugin. We'll need to fix this for the next release. In the meantime I would just raise the exception from the Python wrapper method.
Reply With Quote