Ignore:
Timestamp:
11/23/18 14:48:14 (5 years ago)
Author:
oabramkina
Message:

Dev: adding exception handling.

To activate it, compilation flag -DXIOS_EXCEPTION should be added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_olga/src/transformation/axis_algorithm_interpolate.cpp

    r1412 r1612  
    2929                                                                   std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    3030                                                                   std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     31TRY 
    3132{ 
    3233  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    3940  return (new CAxisAlgorithmInterpolate(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], interpolateAxis)); 
    4041} 
     42CATCH 
    4143 
    4244bool CAxisAlgorithmInterpolate::registerTrans() 
     45TRY 
    4346{ 
    4447  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_INTERPOLATE_AXIS, create); 
    4548} 
    46  
     49CATCH 
    4750 
    4851CAxisAlgorithmInterpolate::CAxisAlgorithmInterpolate(CAxis* axisDestination, CAxis* axisSource, CInterpolateAxis* interpAxis) 
    4952: CAxisAlgorithmTransformation(axisDestination, axisSource), coordinate_(), transPosition_() 
     53TRY 
    5054{ 
    5155  interpAxis->checkValid(axisSource); 
     
    5862  } 
    5963} 
     64CATCH 
    6065 
    6166/*! 
     
    6368*/ 
    6469void CAxisAlgorithmInterpolate::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     70TRY 
    6571{ 
    6672  CTimer::get("CAxisAlgorithmInterpolate::computeIndexSourceMapping_").resume() ; 
     
    8894  CTimer::get("CAxisAlgorithmInterpolate::computeIndexSourceMapping_").suspend() ; 
    8995} 
     96CATCH 
    9097 
    9198/*! 
     
    98105                                                        const std::vector<int>& indexVec, 
    99106                                                        int transPos) 
     107TRY 
    100108{ 
    101109  std::vector<double>::const_iterator itb = axisValue.begin(), ite = axisValue.end(); 
     
    162170  computeWeightedValueAndMapping(interpolatingIndexValues, transPos); 
    163171} 
     172CATCH 
    164173 
    165174/*! 
     
    168177*/ 
    169178void CAxisAlgorithmInterpolate::computeWeightedValueAndMapping(const std::map<int, std::vector<std::pair<int,double> > >& interpolatingIndexValues, int transPos) 
     179TRY 
    170180{ 
    171181  TransformationIndexMap& transMap = this->transformationMapping_[transPos]; 
     
    205215 
    206216} 
     217CATCH 
    207218 
    208219/*! 
     
    213224void CAxisAlgorithmInterpolate::retrieveAllAxisValue(const CArray<double,1>& axisValue, const CArray<bool,1>& axisMask, 
    214225                                                     std::vector<double>& recvBuff, std::vector<int>& indexVec) 
     226TRY 
    215227{ 
    216228  CContext* context = CContext::getCurrent(); 
     
    282294  } 
    283295} 
     296CATCH 
    284297 
    285298/*! 
     
    289302void CAxisAlgorithmInterpolate::fillInAxisValue(std::vector<CArray<double,1> >& vecAxisValue, 
    290303                                                const std::vector<CArray<double,1>* >& dataAuxInputs) 
     304TRY 
    291305{ 
    292306  if (coordinate_.empty()) 
     
    377391  } 
    378392} 
    379  
    380 } 
     393CATCH 
     394 
     395} 
Note: See TracChangeset for help on using the changeset viewer.