You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by aj...@apache.org on 2006/11/28 12:21:24 UTC
svn commit: r479993 - in
/incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python:
PythonServiceWrapper.cpp sca_module.cpp
Author: ajborley
Date: Tue Nov 28 03:21:23 2006
New Revision: 479993
URL: http://svn.apache.org/viewvc?view=rev&rev=479993
Log:
Python extension updates to deal with errors better
Modified:
incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.cpp
incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python/sca_module.cpp
Modified: incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.cpp?view=diff&rev=479993&r1=479992&r2=479993
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python/PythonServiceWrapper.cpp Tue Nov 28 03:21:23 2006
@@ -817,8 +817,8 @@
else
{
Py_DECREF(pFunc);
- Py_DECREF(elementTreeModule);
- Py_DECREF(elementTreeModuleName);
+ Py_XDECREF(elementTreeModule);
+ Py_XDECREF(elementTreeModuleName);
if(PyErr_Occurred())
{
Modified: incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python/sca_module.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python/sca_module.cpp?view=diff&rev=479993&r1=479992&r2=479993
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python/sca_module.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/python/src/tuscany/sca/python/sca_module.cpp Tue Nov 28 03:21:23 2006
@@ -291,8 +291,7 @@
PyObject* elementTreeToStringFunc = PyObject_GetAttrString(elementTreeModule, "tostring");
PyObject* pElemString = PyObject_CallFunction(elementTreeToStringFunc, "O", param);
char* data = PyString_AsString(pElemString);
- loginfo("SDO param %d: %s", i, data);
-
+
Py_DECREF(elementTreeToStringFunc);
Py_DECREF(pElemString);
@@ -316,7 +315,9 @@
else
{
string msg = "xml.etree.ElementTree.Element could not be converted to a DataObject";
- throwException(ServiceDataException, msg.c_str());
+ logerror(msg.c_str());
+ PyErr_SetString(scaError, msg.c_str());
+ return NULL;
}
}
else
@@ -452,8 +453,8 @@
}
- Py_DECREF(elementTreeModuleName);
- Py_DECREF(elementTreeModule);
+ Py_XDECREF(elementTreeModuleName);
+ Py_XDECREF(elementTreeModule);
return returnValue;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org