Changeset 3587 in Sophya for trunk/SophyaLib/NTools/generalfit.cc


Ignore:
Timestamp:
Mar 5, 2009, 2:26:38 PM (17 years ago)
Author:
ansari
Message:

Adaptation suite nettoyage/suppression TRY/CATCH... , Reza 05/03/2009

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/NTools/generalfit.cc

    r3572 r3587  
    161161 ASSERT(mNPar<1000000);
    162162
    163  TRY {
    164    General_Init();
    165  } CATCHALL {
    166    THROW_SAME;
    167  } ENDTRY
    168 
     163 General_Init();
    169164}
    170165
     
    202197 ASSERT( mNPar < 1000000 );
    203198
    204  TRY {
    205    General_Init();
    206  } CATCHALL {
    207    THROW_SAME;
    208  } ENDTRY
    209 
     199 General_Init();
    210200}
    211201
     
    242232 GetIntEnv("PDEBUG_GENERALFIT",debugLevel);
    243233
    244  TRY {
     234 try {
    245235   fixParam   = new unsigned short int[mNPar];
    246236   boundParam = new unsigned short int[mNPar];
    247237   nameParam  = new string[mNPar];
    248  } CATCHALL {
     238 } 
     239 catch (...) {
    249240   cout<<"GeneralFit::GeneralFit Impossible d'allouer l'espace"<<endl;
    250    THROW_SAME;
    251  } ENDTRY
     241   throw AllocationError("GeneralFit::GeneralFit() error allocating with new ...");
     242}
    252243
    253244 Param        = (double)  0.;
     
    910901
    911902   // Calcul de la matrice des covariances
    912 #ifdef __mac__
    913    COVAR = SimpleMatrixOperation<r_8>::Inverse(ATGA); /* $CHECK$  Reza 10/3/2000 */
    914 #else
    915    TRY {
     903   try {
    916904     COVAR = SimpleMatrixOperation<r_8>::Inverse(ATGA); /* $CHECK$  Reza 10/3/2000 */
    917    } CATCHALL {
     905   }
     906   catch (MathExc& exc) {
    918907     if(debugLevel>0) {
     908       cout<<"GeneralFit::Fit()/Exception:" << exc.what() << endl;
    919909       cout<<"Pb inversion matrice ATGA:"<<endl;
    920910       cout<<ATGA;
    921911     }
    922912     return(-10);
    923    } ENDTRY
    924 #endif
     913  }
    925914
    926915   if (debugLevel >= 3) {
Note: See TracChangeset for help on using the changeset viewer.