Ignore:
Timestamp:
11/23/18 14:48:14 (2 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_extract_domain.cpp

    r1260 r1612  
    2525                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2626                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     27TRY 
    2728{ 
    2829  std::vector<CAxis*> axisListDestP = gridDst->getAxis(); 
     
    3536  return (new CAxisAlgorithmExtractDomain(axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], extractDomain)); 
    3637} 
     38CATCH 
    3739 
    3840//bool CAxisAlgorithmExtractDomain::_dummyRegistered = CAxisAlgorithmExtractDomain::registerTrans(); 
    3941bool CAxisAlgorithmExtractDomain::registerTrans() 
     42TRY 
    4043{ 
    4144  CGridTransformationFactory<CAxis>::registerTransformation(TRANS_EXTRACT_DOMAIN_TO_AXIS, create); 
    4245} 
     46CATCH 
    4347 
    4448 
    4549CAxisAlgorithmExtractDomain::CAxisAlgorithmExtractDomain(CAxis* axisDestination, CDomain* domainSource, CExtractDomainToAxis* algo) 
    4650 : CAxisAlgorithmTransformation(axisDestination, domainSource), pos_(-1), reduction_(0) 
     51TRY 
    4752{ 
    4853  algo->checkValid(axisDestination, domainSource); 
     
    6469  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 
    6570} 
     71CATCH 
    6672 
    6773void CAxisAlgorithmExtractDomain::apply(const std::vector<std::pair<int,double> >& localIndex, 
     
    7076                                        std::vector<bool>& flagInitial,                      
    7177                                        bool ignoreMissingValue, bool firstPass) 
     78TRY 
    7279{ 
    7380  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    7481} 
     82CATCH 
    7583 
    7684CAxisAlgorithmExtractDomain::~CAxisAlgorithmExtractDomain() 
     85TRY 
    7786{ 
    7887  if (0 != reduction_) delete reduction_; 
    7988} 
     89CATCH 
    8090 
    8191void CAxisAlgorithmExtractDomain::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     92TRY 
    8293{ 
    8394  this->transformationMapping_.resize(1); 
     
    117128  {} 
    118129} 
    119  
     130CATCH 
    120131} 
Note: See TracChangeset for help on using the changeset viewer.