Changeset 3587 in Sophya for trunk/SophyaLib


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

Location:
trunk/SophyaLib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/HiStats/histos.cc

    r3572 r3587  
    10691069  if( ii != nLowHigh ) throw ParmError(PExcLongMessage(""));
    10701070  Poly pol(degree);
    1071   TRY {
    1072     pol.Fit(xFit, yFit, e2Fit, degree, errcoef);
    1073     if (debug>1) cout << "resultat fit = " << pol << endl;
    1074     pol.Derivate();
    1075   } CATCHALL {
    1076     THROW_SAME;
    1077   } ENDTRY
     1071  pol.Fit(xFit, yFit, e2Fit, degree, errcoef);
     1072  if (debug>1) cout << "resultat fit = " << pol << endl;
     1073  pol.Derivate();
    10781074
    10791075  int_4 DPolDeg = pol.Degre();
  • trunk/SophyaLib/NTools/dates.cc

    r3572 r3587  
    112112 
    113113  // Nous sommes dans un mois-frontiere
    114   DBASSERT(dt.MM == dstStopMonth || dt.MM == dstStartMonth);
     114  ASSERT(dt.MM == dstStopMonth || dt.MM == dstStartMonth);
    115115 
    116116  if (dt.MM == dstStartMonth) {
     
    493493 
    494494  if (tOpt == kLocalTime) {
    495     DBASSERT(timeZone != NULL);
     495    ASSERT(timeZone != NULL);
    496496    operator -= (timeZone->gmtOffset/24.0);
    497497    if (timeZone->IsDst(*this))
     
    511511  Date dt(*this);
    512512  if (tOpt == kLocalTime && !UndetTime()) {
    513     DBASSERT(timeZone != NULL);
     513    ASSERT(timeZone != NULL);
    514514    dt += timeZone->GetOffset(*this)/24.0;
    515515  }
     
    535535  Date dt(*this);
    536536  if (tOpt == kLocalTime && !UndetTime()) {
    537     DBASSERT(timeZone != NULL);
     537    ASSERT(timeZone != NULL);
    538538    dt += timeZone->GetOffset(*this)/24.0;
    539539  }
     
    569569  Date dt(*this);
    570570  if (tOpt == kLocalTime) {
    571     DBASSERT(timeZone != NULL);
     571    ASSERT(timeZone != NULL);
    572572    dt += timeZone->GetOffset(*this)/24.0;
    573573  }
     
    628628  double t = GetDays();
    629629  if (tOpt == kLocalTime && hh >=0) {
    630     DBASSERT(timeZone != NULL);
     630    ASSERT(timeZone != NULL);
    631631    t += timeZone->GetOffset(*this)/24.0;
    632632  }
  • 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) {
  • trunk/SophyaLib/NTools/integ.cc

    r3409 r3587  
    8080  mXMin(xmin), mXMax(xmax)
    8181{
    82   DBASSERT(gff->NVar() == 1);
     82  ASSERT(gff->NVar() == 1);
    8383}
    8484
     
    9494  mXMin(0), mXMax(1)
    9595{
    96   DBASSERT(gff->NVar() == 1);
     96  ASSERT(gff->NVar() == 1);
    9797}
    9898
     
    140140Integrator::ReqPrec(double p)
    141141{
    142   DBASSERT( !"Pas encore implemente !");
     142  ASSERT( !"Pas encore implemente !");
    143143  mReqPrec = p;
    144144  mDX = mNStep = -1;
     
    191191  mGFFParm = par;
    192192  mFunc = NULL;
    193   DBASSERT(gff->NVar() == 1);
     193  ASSERT(gff->NVar() == 1);
    194194  FuncChanged();
    195195  return *this;
     
    199199Integrator::FVal(double x) const
    200200{
    201   DBASSERT( mFunc || mClFun || (mGFF && mGFFParm) );
     201  ASSERT( mFunc || mClFun || (mGFF && mGFFParm) );
    202202  if (mFunc) return mFunc(x);
    203203  else return mClFun ? (*mClFun)(x) : mGFF->Value(&x, mGFFParm);
Note: See TracChangeset for help on using the changeset viewer.