Author: jsdelfino
Date: Fri Dec 1 14:56:03 2006
New Revision: 481436
URL: http://svn.apache.org/viewvc?view=rev&rev=481436
Log:
Better error reporting, turn a TuscanyRuntimeException into a Python exception.
Modified:
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/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=481436&r1=481435&r2=481436
==============================================================================
---
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
Fri Dec 1 14:56:03 2006
@@ -39,8 +39,10 @@
#include <string>
#include <iostream>
+#include <sstream>
using namespace std;
+
// undefine _DEBUG so Python does not need it's debug dll
#ifdef _DEBUG
#undef _DEBUG
@@ -352,6 +354,18 @@
{
// Invoke the wired service
pythonServiceProxy->invokeService(operation);
+ }
+ catch(const TuscanyRuntimeException& e)
+ {
+ ostringstream msgs;
+ msgs << "Exception whilst invoking the ";
+ msgs << operationName.c_str();
+ msgs << " operation on the service/reference: ";
+ msgs << e;
+ string msg = msgs.str();
+ logwarning(msg.c_str());
+ PyErr_SetString(scaError, msg.c_str());
+ return NULL;
}
catch(...)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]