From: Ovidiu Mircescu Date: Mon, 8 Feb 2016 16:46:30 +0000 (+0100) Subject: Cleaning MPIComponent. X-Git-Tag: V8_1_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c40b8a8f9eaf760976375ec8f4fa106794d46bbd;p=tools%2Fyacsgen.git Cleaning MPIComponent. --- diff --git a/module_generator/mpi_tmpl.py b/module_generator/mpi_tmpl.py index 6ce3172..c393c1c 100644 --- a/module_generator/mpi_tmpl.py +++ b/module_generator/mpi_tmpl.py @@ -110,10 +110,7 @@ extern "C" } MPI_Comm_rank( MPI_COMM_WORLD, &numproc ); - if( numproc == 0 ) - regist = true; - else - regist = false; + regist = ( numproc == 0 ); ${component}_i * myEngine = new ${component}_i(orb, poa, contId, instanceName, interfaceName, regist); return myEngine->getId() ; } @@ -275,10 +272,6 @@ ${body} catch ( const SALOME_Exception & ex) { THROW_SALOME_CORBA_EXCEPTION(CORBA::string_dup(ex.what()), SALOME::INTERNAL_ERROR); -/* SALOME::ExceptionStruct es; - es.text=CORBA::string_dup(ex.what()); - es.type=SALOME::INTERNAL_ERROR; - throw SALOME::SALOME_Exception(es);*/ } catch ( const SALOME::SALOME_Exception & ex) { @@ -287,20 +280,10 @@ ${body} catch ( const std::exception& ex) { THROW_SALOME_CORBA_EXCEPTION(CORBA::string_dup(ex.what()), SALOME::INTERNAL_ERROR); -/* //std::cerr << typeid(ex).name() << std::endl; - SALOME::ExceptionStruct es; - es.text=CORBA::string_dup(ex.what()); - es.type=SALOME::INTERNAL_ERROR; - throw SALOME::SALOME_Exception(es);*/ } catch (...) { THROW_SALOME_CORBA_EXCEPTION("unknown exception", SALOME::INTERNAL_ERROR); -/* std::cerr << "unknown exception" << std::endl; - SALOME::ExceptionStruct es; - es.text=CORBA::string_dup(" unknown exception"); - es.type=SALOME::INTERNAL_ERROR; - throw SALOME::SALOME_Exception(es);*/ } endService("${component}_i::${service}"); }