X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2FPythonNode.cxx;fp=src%2Fruntime%2FPythonNode.cxx;h=9cc71d542e14fbe4fe170b8ac98512caa0369c3d;hb=29bd2d7005bb53a0d8ce7012a96d3dcd667b5842;hp=b72a37167e4cd57fce2e3f85ded3004de78535df;hpb=1c08ba9d8254258e0bed89a2cb2d9cf3cb4a434c;p=modules%2Fyacs.git diff --git a/src/runtime/PythonNode.cxx b/src/runtime/PythonNode.cxx index b72a37167..9cc71d542 100644 --- a/src/runtime/PythonNode.cxx +++ b/src/runtime/PythonNode.cxx @@ -497,6 +497,60 @@ void PythonNode::executeRemote() _errorDetails=msg.str(); throw Exception(msg.str()); } + catch(CORBA::COMM_FAILURE& ex) + { + std::ostringstream msg; + msg << "Exception on remote python invocation." << std::endl ; + msg << "Caught system exception COMM_FAILURE -- unable to contact the " + << "object." << std::endl; + _errorDetails=msg.str(); + throw Exception(msg.str()); + } + catch(CORBA::SystemException& ex) + { + std::ostringstream msg; + msg << "Exception on remote python invocation." << std::endl ; + msg << "Caught a CORBA::SystemException." ; + CORBA::Any tmp; + tmp <<= ex; + CORBA::TypeCode_var tc = tmp.type(); + const char *p = tc->name(); + if ( *p != '\0' ) + msg <id(); + msg << std::endl; + _errorDetails=msg.str(); + throw Exception(msg.str()); + } + catch(CORBA::Exception& ex) + { + std::ostringstream msg; + msg << "Exception on remote python invocation." << std::endl ; + msg << "Caught CORBA::Exception. " ; + CORBA::Any tmp; + tmp <<= ex; + CORBA::TypeCode_var tc = tmp.type(); + const char *p = tc->name(); + if ( *p != '\0' ) + msg <id(); + msg << std::endl; + _errorDetails=msg.str(); + throw Exception(msg.str()); + } + catch(omniORB::fatalException& fe) + { + std::ostringstream msg; + msg << "Exception on remote python invocation." << std::endl ; + msg << "Caught omniORB::fatalException:" << std::endl; + msg << " file: " << fe.file() << std::endl; + msg << " line: " << fe.line() << std::endl; + msg << " mesg: " << fe.errmsg() << std::endl; + _errorDetails=msg.str(); + throw Exception(msg.str()); + } // if(!CORBA::is_nil(_pynode)) // { // _pynode->UnRegister(); @@ -1158,6 +1212,60 @@ void PyFuncNode::executeRemote() _errorDetails=msg; throw Exception(msg); } + catch(CORBA::COMM_FAILURE& ex) + { + std::ostringstream msg; + msg << "Exception on remote python invocation." << std::endl ; + msg << "Caught system exception COMM_FAILURE -- unable to contact the " + << "object." << std::endl; + _errorDetails=msg.str(); + throw Exception(msg.str()); + } + catch(CORBA::SystemException& ex) + { + std::ostringstream msg; + msg << "Exception on remote python invocation." << std::endl ; + msg << "Caught a CORBA::SystemException." ; + CORBA::Any tmp; + tmp <<= ex; + CORBA::TypeCode_var tc = tmp.type(); + const char *p = tc->name(); + if ( *p != '\0' ) + msg <id(); + msg << std::endl; + _errorDetails=msg.str(); + throw Exception(msg.str()); + } + catch(CORBA::Exception& ex) + { + std::ostringstream msg; + msg << "Exception on remote python invocation." << std::endl ; + msg << "Caught CORBA::Exception. " ; + CORBA::Any tmp; + tmp <<= ex; + CORBA::TypeCode_var tc = tmp.type(); + const char *p = tc->name(); + if ( *p != '\0' ) + msg <id(); + msg << std::endl; + _errorDetails=msg.str(); + throw Exception(msg.str()); + } + catch(omniORB::fatalException& fe) + { + std::ostringstream msg; + msg << "Exception on remote python invocation." << std::endl ; + msg << "Caught omniORB::fatalException:" << std::endl; + msg << " file: " << fe.file() << std::endl; + msg << " line: " << fe.line() << std::endl; + msg << " mesg: " << fe.errmsg() << std::endl; + _errorDetails=msg.str(); + throw Exception(msg.str()); + } DEBTRACE( "-----------------end of remote python invocation-----------------" ); //=========================================================================== // Get results, unpickle and put them in output ports