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/io/nc4_data_input.cpp

    r1589 r1612  
    2929 
    3030  StdSize CNc4DataInput::getFieldNbRecords_(CField* field) 
     31  TRY 
    3132  { 
    3233    StdString fieldId = field->getFieldOutputName(); 
     
    4041    return 1; 
    4142  } 
     43  CATCH 
    4244 
    4345  void CNc4DataInput::readFieldData_(CField* field) 
     46  TRY 
    4447  { 
    4548    CContext* context = CContext::getCurrent(); 
     
    121124    } 
    122125  } 
     126  CATCH 
    123127 
    124128  void CNc4DataInput::readFieldAttributes_(CField* field, bool readAttributeValues) 
     129  TRY 
    125130  { 
    126131    StdString fieldId = field->getFieldOutputName(); 
     
    248253    } 
    249254  } 
     255  CATCH 
    250256 
    251257  /*! 
     
    258264  void CNc4DataInput::readDomainAttributeValueFromFile(CDomain* domain, std::list<std::pair<StdString, StdSize> >& dimSizeMap, 
    259265                                                       int elementPosition, const StdString& fieldId) 
     266  TRY 
    260267  { 
    261268    // There are some optional attributes of a domain to retrieve from file    // + lon lat? 
     
    436443    domain->fillInLonLat(); 
    437444  } 
     445  CATCH 
    438446 
    439447  /*! 
     
    446454  void CNc4DataInput::readDomainAttributesFromFile(CDomain* domain, std::list<std::pair<StdString, StdSize> >& dimSizeMap, 
    447455                                                   int elementPosition, const StdString& fieldId) 
     456  TRY 
    448457  { 
    449458    // There are some mandatory attributes of a domain to retrieve from file 
     
    514523    } 
    515524  } 
     525  CATCH 
    516526 
    517527  /*! 
     
    524534  void CNc4DataInput::readAxisAttributesFromFile(CAxis* axis, std::list<std::pair<StdString, StdSize> >& dimSizeMap, 
    525535                                                 int elementPosition, const StdString& fieldId) 
     536  TRY 
    526537  { 
    527538    std::list<std::pair<StdString, StdSize> >::const_iterator itMapN = dimSizeMap.begin(), 
     
    540551    axis->n_glo.setValue(itMapN->second); 
    541552  } 
     553  CATCH 
    542554 
    543555  /*! 
     
    550562  void CNc4DataInput::readAxisAttributeValueFromFile(CAxis* axis, std::list<std::pair<StdString, StdSize> >& dimSizeMap, 
    551563                                                    int elementPosition, const StdString& fieldId) 
     564  TRY 
    552565  { 
    553566    std::list<std::pair<StdString, StdSize> >::const_iterator itMapN = dimSizeMap.begin(), 
     
    570583    } 
    571584  } 
     585  CATCH 
    572586 
    573587  /*! 
     
    598612 
    599613  void CNc4DataInput::closeFile_(void) 
     614  TRY 
    600615  { 
    601616    SuperClassWriter::close(); 
    602617  } 
     618  CATCH 
    603619} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.