From: Gerald Nicolas Date: Thu, 20 Mar 2014 16:37:09 +0000 (+0100) Subject: En cas d'erreur, affichage du nom du fichier à consulter. X-Git-Tag: V7_4_0a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=582d96847515ed0d46495531171b0da99a9a0eb1;p=modules%2Fhomard.git En cas d'erreur, affichage du nom du fichier à consulter. --- diff --git a/src/HOMARDGUI/MonCreateHypothesis.cxx b/src/HOMARDGUI/MonCreateHypothesis.cxx index 8b63d9ab..77de5219 100644 --- a/src/HOMARDGUI/MonCreateHypothesis.cxx +++ b/src/HOMARDGUI/MonCreateHypothesis.cxx @@ -782,8 +782,8 @@ void MonCreateHypothesis::AssocieComposants() _aFieldName=CBFieldName->currentText(); aHypothesis->SetField(CORBA::string_dup(_aFieldName.toStdString().c_str()) ) ; - aHypothesis->SetRefinThr( _TypeThR, _ThreshR ) ; - aHypothesis->SetUnRefThr( _TypeThC, _ThreshC ) ; + if ( _TypeThR > 0 ) { aHypothesis->SetRefinThr( _TypeThR, _ThreshR ) ; } + if ( _TypeThC > 0 ) { aHypothesis->SetUnRefThr( _TypeThC, _ThreshC ) ; } aHypothesis->SetUseField( _UsField ) ; aHypothesis->SetUseComp( _UsCmpI ) ; _aListeComposant = GetListCompChecked() ; diff --git a/src/HOMARD_I/HOMARD_Gen_i.cxx b/src/HOMARD_I/HOMARD_Gen_i.cxx index fbc5f9c7..bd1db458 100755 --- a/src/HOMARD_I/HOMARD_Gen_i.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i.cxx @@ -2628,7 +2628,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena // H.3 Message d'erreur if (codretexec != 0) { - std::string text ; + std::string text = "" ; // Message d'erreur en cas de probleme en adaptation if ( modeHOMARD == 1 ) { @@ -2651,10 +2651,7 @@ CORBA::Long HOMARD_Gen_i::Compute(const char* NomIteration, CORBA::Long etatMena } } } - else - { - text = "Voir le fichier Liste.log.\n" ; - } + text += "\n\nSee the file " + LogFile + "\n" ; INFOS ( text ) ; SALOME::ExceptionStruct es; es.type = SALOME::BAD_PARAM; @@ -2780,6 +2777,7 @@ CORBA::Long HOMARD_Gen_i::ComputeAdap(HOMARD::HOMARD_Cas_var myCase, HOMARD::HOM int TypeAdap = (*ListTypes)[0]; int TypeRaff = (*ListTypes)[1]; int TypeDera = (*ListTypes)[2]; +// MESSAGE ( ". TypeAdap = " << TypeAdap << ", TypeRaff = " << TypeRaff << ", TypeDera = " << TypeDera ); // E. Texte du fichier de configuration // E.1. Incontournables du texte @@ -2884,11 +2882,10 @@ char* HOMARD_Gen_i::CreateDirNameIter(const char* nomrep, CORBA::Long num ) // que c'est bien un probleme d'absence #ifndef WIN32 if ( chdir(DirNameA.str().c_str()) != 0 ) - { #else if ( _chdir(DirNameA.str().c_str()) != 0 ) - { #endif + { bool existe = false ; #ifndef WIN32 DIR *dp; @@ -2960,16 +2957,13 @@ char* HOMARD_Gen_i::ComputeDirManagement(HOMARD::HOMARD_Cas_var myCase, HOMARD:: #ifndef WIN32 if (chdir(DirCompute.str().c_str()) != 0) { -// Creation du repertoire car il n'existe pas : if (mkdir(DirCompute.str().c_str(), S_IRWXU|S_IRGRP|S_IXGRP) != 0) - { #else if (_chdir(DirCompute.str().c_str()) != 0) { -// Creation du repertoire car il n'existe pas : if (_mkdir(DirCompute.str().c_str()) != 0) - { #endif + { // GERALD -- QMESSAGE BOX std::cerr << "Pb Creation du repertoire DirCompute = " << DirCompute.str() << std::endl; VERIFICATION("Pb a la creation du repertoire" == 0); diff --git a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx index f2dd9181..73c279e9 100644 --- a/src/HOMARD_I/HOMARD_Hypothesis_i.cxx +++ b/src/HOMARD_I/HOMARD_Hypothesis_i.cxx @@ -122,11 +122,15 @@ void HOMARD_Hypothesis_i::SetUnifRefinUnRef( CORBA::Long TypeRaffDera ) TypeRaff = 1 ; TypeDera = 0 ; } - else + else if ( TypeRaffDera == -1 ) { TypeRaff = 0 ; TypeDera = 1 ; } + else + { + ASSERT( "TypeRaffDera should be 1 or -1" == 0 ); + } myHomardHypothesis->SetAdapType( -1 ); myHomardHypothesis->SetRefinTypeDera( TypeRaff, TypeDera ); } @@ -231,8 +235,11 @@ HOMARD::listeComposantsHypo* HOMARD_Hypothesis_i::GetComps() void HOMARD_Hypothesis_i::SetRefinThr( CORBA::Long TypeThR, CORBA::Double ThreshR ) { myHomardHypothesis->SetAdapType( 1 ); - int TypeDera = myHomardHypothesis->GetUnRefType() ; - myHomardHypothesis->SetRefinTypeDera( 1, TypeDera ); + if ( TypeThR > 0 ) + { + int TypeDera = myHomardHypothesis->GetUnRefType() ; + myHomardHypothesis->SetRefinTypeDera( 1, TypeDera ); + } myHomardHypothesis->SetRefinThr( TypeThR, ThreshR ); } //============================================================================= @@ -245,8 +252,11 @@ CORBA::Long HOMARD_Hypothesis_i::GetRefinThrType() void HOMARD_Hypothesis_i::SetUnRefThr( CORBA::Long TypeThC, CORBA::Double ThreshC ) { myHomardHypothesis->SetAdapType( 1 ); - int TypeRaff = myHomardHypothesis->GetRefinType() ; - myHomardHypothesis->SetRefinTypeDera( TypeRaff, 1 ); + if ( TypeThC > 0 ) + { + int TypeRaff = myHomardHypothesis->GetRefinType() ; + myHomardHypothesis->SetRefinTypeDera( TypeRaff, 1 ); + } myHomardHypothesis->SetUnRefThr( TypeThC, ThreshC ); } //=============================================================================