Ignore:
Timestamp:
09/01/15 17:15:42 (9 years ago)
Author:
rlacroix
Message:

Rephrase some error messages so that they are clearer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/type/enum_ref_impl.hpp

    r591 r680  
    160160     
    161161    ERROR("template <typename T> void CEnum_ref<T>::_fromString(const string& str)", 
    162     << tmpStr << " cannot be converted in a valid enumeration, possibilities are : "<<strList.str() ) ; 
     162          << tmpStr << " cannot be converted in a valid enumeration, possibilities are: " << strList.str()); 
    163163  } 
    164164   
     
    178178    else if (sizeof(*ptrValue)==sizeof(int)) return buffer.put((int) *ptrValue) ; 
    179179    else if (sizeof(*ptrValue)==sizeof(long int)) return buffer.put((long int) *ptrValue) ; 
    180     else ERROR("template <typename T>  bool CEnum_ref<T>::_toBuffer(CBufferOut& buffer) const", 
    181                <<"incompatibility between enumeration and standard integer type") ; 
     180    else ERROR("template <typename T> bool CEnum_ref<T>::_toBuffer(CBufferOut& buffer) const", 
     181               << "incompatibility between enumeration and standard integer type."); 
    182182    return false ; 
    183183  } 
     
    206206      if (ret) *ptrValue = (T_enum) val ; 
    207207    } 
    208     else ERROR("template <typename T>  bool CEnum_ref<T>::_fromBuffer(CBufferIn& buffer)", 
    209                <<"incompatibility between enumeration and standard integer type") ; 
     208    else ERROR("template <typename T> bool CEnum_ref<T>::_fromBuffer(CBufferIn& buffer)", 
     209               << "incompatibility between enumeration and standard integer type."); 
    210210    return ret ; 
    211211  } 
     
    234234      if (ret) *ptrValue = (T_enum) val ; 
    235235    } 
    236     else ERROR("template <typename T>  bool CEnum_ref<T>::_fromBuffer(CBufferIn& buffer)", 
    237                <<"incompatibility between enumeration and standard integer type") ; 
     236    else ERROR("template <typename T> bool CEnum_ref<T>::_fromBuffer(CBufferIn& buffer)", 
     237               << "incompatibility between enumeration and standard integer type"); 
    238238  } 
    239239  
     
    260260  { 
    261261    if (empty) ERROR("template <typename T> void CEnum_ref<T>::checkEmpty(void)", 
    262                      <<"Type_ref reference is not assigned") ; 
     262                     << "Enum reference is not initialized.") ; 
    263263  } 
    264264                      
     
    269269  { 
    270270    if (!type.toBuffer(buffer)) ERROR("template <typename T> CBufferOut& operator<<(CBufferOut& buffer, const CEnum_ref<T>& type)", 
    271                                            <<"Buffer remain size is to low for size type") ; 
     271                                      << "Not enough free space in buffer to queue the enum."); 
    272272    return buffer ; 
    273273  } 
     
    277277  { 
    278278    if (!CEnum_ref<T>(type).toBuffer(buffer)) ERROR("template <typename T> CBufferOut& operator<<(CBufferOut& buffer, const typename T::t_enum& type)", 
    279                                              <<"Buffer remain size is to low for size type") ;       
     279                                                    << "Not enough free space in buffer to queue the enum."); 
    280280    return buffer ; 
    281281  } 
     
    284284  CBufferIn& operator>>(CBufferIn& buffer, typename T::t_enum& type) 
    285285  { 
    286     if (! CEnum_ref<T>(type).fromBuffer(buffer)) ERROR("template <typename T>  CBufferIn& operator>>(CBufferIn& buffer, typename T::t_enum& type)", 
    287                                                        <<"Buffer remain size is to low for size type") ; 
     286    if (!CEnum_ref<T>(type).fromBuffer(buffer)) ERROR("template <typename T>  CBufferIn& operator>>(CBufferIn& buffer, typename T::t_enum& type)", 
     287                                                      << "Not enough data in buffer to unqueue the enum."); 
    288288    return buffer ; 
    289289  } 
     
    292292  CBufferIn& operator>>(CBufferIn& buffer, const CEnum_ref<T>& type) 
    293293  { 
    294     if (! type.fromBuffer(buffer) ) ERROR("  template <typename T> CBufferIn& operator>>(CBufferIn& buffer, const CEnum_ref<T>& type) ", 
    295                                            <<"Buffer remain size is to low for size type") ; 
     294    if (!type.fromBuffer(buffer)) ERROR("template <typename T> CBufferIn& operator>>(CBufferIn& buffer, const CEnum_ref<T>& type) ", 
     295                                        << "Not enough data in buffer to unqueue the enum."); 
     296    return buffer ; 
    296297    return buffer ; 
    297298  } 
Note: See TracChangeset for help on using the changeset viewer.