From 5376005e3c82ab7a3464ca6405696916f8f2e6bd Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Thu, 3 Nov 2005 20:36:42 +0000 Subject: 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 --- externals/grill/py/source/pyext.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'externals/grill/py/source') 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 -- cgit v1.2.1