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/scalar_algorithm_extract_axis.cpp

    r1260 r1612  
    2626                                                                     std::map<int, int>& elementPositionInGridDst2AxisPosition, 
    2727                                                                     std::map<int, int>& elementPositionInGridDst2DomainPosition) 
     28TRY 
    2829{ 
    2930  std::vector<CScalar*> scalarListDestP = gridDst->getScalars(); 
     
    3637  return (new CScalarAlgorithmExtractAxis(scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], extractAxis)); 
    3738} 
     39CATCH 
    3840 
    3941bool CScalarAlgorithmExtractAxis::registerTrans() 
     42TRY 
    4043{ 
    4144  CGridTransformationFactory<CScalar>::registerTransformation(TRANS_EXTRACT_AXIS_TO_SCALAR, create); 
    4245} 
     46CATCH 
    4347 
    4448CScalarAlgorithmExtractAxis::CScalarAlgorithmExtractAxis(CScalar* scalarDestination, CAxis* axisSource, CExtractAxisToScalar* algo) 
    4549 : CScalarAlgorithmTransformation(scalarDestination, axisSource), 
    4650   reduction_(0) 
     51TRY 
    4752{ 
    4853  algo->checkValid(scalarDestination, axisSource); 
     
    5156  reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 
    5257} 
     58CATCH 
    5359 
    5460void CScalarAlgorithmExtractAxis::apply(const std::vector<std::pair<int,double> >& localIndex, 
     
    5763                                         std::vector<bool>& flagInitial,                      
    5864                                         bool ignoreMissingValue, bool firstPass) 
     65TRY 
    5966{ 
    6067  reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 
    6168} 
     69CATCH 
    6270 
    6371CScalarAlgorithmExtractAxis::~CScalarAlgorithmExtractAxis() 
     72TRY 
    6473{ 
    6574  if (0 != reduction_) delete reduction_; 
    6675} 
     76CATCH 
    6777 
    6878void CScalarAlgorithmExtractAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     79TRY 
    6980{ 
    7081  this->transformationMapping_.resize(1); 
     
    7788  transWeight[0].push_back(1.0); 
    7889} 
     90CATCH 
    7991 
    8092} 
Note: See TracChangeset for help on using the changeset viewer.