Ignore:
Timestamp:
04/12/18 18:51:08 (6 years ago)
Author:
oabramkina
Message:

Exception handling for attributes by means of dynamic binding. This assures that attribute's id will always be printed in the error message.

Replacing changes done in r1477.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/attribute_template_impl.hpp

    r1477 r1478  
    6767      } 
    6868 
    69  
    70       template <class T> 
    71          T CAttributeTemplate<T>::getValue(void) const 
    72       { 
    73         try { 
    74           return CType<T>::get() ; 
    75         } 
    76         catch (xios::CException & exc) 
     69      template <class T> 
     70      void CAttributeTemplate<T>::checkEmpty(void) const 
     71      { 
     72        if (CType<T>::empty) 
    7773        { 
    7874          StdString msg("On checking attribute with id="); 
     
    8278          ERROR("template <typename T> void CType<T>::checkEmpty(void) const", << msg); 
    8379        } 
     80      } 
     81 
     82 
     83      template <class T> 
     84         T CAttributeTemplate<T>::getValue(void) const 
     85      { 
     86        return CType<T>::get() ; 
    8487 
    8588/* 
Note: See TracChangeset for help on using the changeset viewer.