diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-11-03 20:36:42 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-11-03 20:36:42 +0000 |
commit | 5376005e3c82ab7a3464ca6405696916f8f2e6bd (patch) | |
tree | 8151165e254dad75ec3da1e4dc97cecfbd36cd04 /externals/grill/py/source | |
parent | 0f833c72de82b8d9fdcd53b4f10ffdb986382c85 (diff) |
display error messages if calling __init__ or _del caused an exception
updated docs
compiler flag to exclude DSP objects
pyext: fix for missing __init__ attribute
some ASSERTs for explicitly created pyext classes (should be runtime checks i guess)
let _inlets and _outlets default to 0
svn path=/trunk/; revision=3829
Diffstat (limited to 'externals/grill/py/source')
-rw-r--r-- | externals/grill/py/source/pyext.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/externals/grill/py/source/pyext.cpp b/externals/grill/py/source/pyext.cpp index 91be31e0..b3cafb8a 100644 --- a/externals/grill/py/source/pyext.cpp +++ b/externals/grill/py/source/pyext.cpp @@ -251,9 +251,12 @@ bool pyext::DoInit() if(init) { if(PyMethod_Check(init)) { PyObject *res = PyObject_CallObject(init,pargs); - if(!res) + if(!res) { // exception is set ok = false; + // we want to know why __init__ failed... + PyErr_Print(); + } else Py_DECREF(res); } @@ -281,10 +284,8 @@ void pyext::DoExit() PyObject *ret = PyObject_CallObject(objdel,NULL); if(ret) Py_DECREF(ret); -#ifdef FLEXT_DEBUG - else - post("%s - Could not call _del method",thisName()); -#endif + else + PyErr_Print(); Py_DECREF(objdel); } else |