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_impl.hpp

    r591 r680  
    159159     
    160160    ERROR("template <typename T> void CEnum<T>::_fromString(const string& str)", 
    161     << tmpStr << " cannot be converted in a valid enumeration, possibilities are : "<<strList.str() ) ; 
     161          << tmpStr << " cannot be converted in a valid enumeration, possibilities are: " << strList.str()); 
    162162 
    163163  } 
     
    189189    else if (sizeof(*ptrValue)==sizeof(int)) return buffer.put((int) *ptrValue) ; 
    190190    else if (sizeof(*ptrValue)==sizeof(long int)) return buffer.put((long int) *ptrValue) ; 
    191     else ERROR("template <typename T>  bool CEnum<T>::_toBuffer(CBufferOut& buffer) const", 
    192                <<"incompatibility between enumeration and standard integer type") ; 
     191    else ERROR("template <typename T> bool CEnum<T>::_toBuffer(CBufferOut& buffer) const", 
     192               << "incompatibility between enumeration and standard integer type."); 
    193193    return false ; 
    194194  } 
     
    217217      if (ret) *ptrValue = (T_enum) val ; 
    218218    } 
    219     else ERROR("template <typename T>  bool CEnum<T>::_fromBuffer(CBufferIn& buffer)", 
    220                <<"incompatibility between enumeration and standard integer type") ; 
     219    else ERROR("template <typename T> bool CEnum<T>::_fromBuffer(CBufferIn& buffer)", 
     220               << "incompatibility between enumeration and standard integer type."); 
    221221    return ret ; 
    222222  } 
     
    246246  void CEnum<T>::checkEmpty(void) const 
    247247  { 
    248     if (empty) ERROR("template <typename T> void CEnum<T>::checkEmpty(void) const", <<"Type is not initialized") ; 
     248    if (empty) ERROR("template <typename T> void CEnum<T>::checkEmpty(void) const", 
     249                     << "Enum is not initialized."); 
    249250  }   
    250251 
     
    254255  { 
    255256    if (!type.toBuffer(buffer)) ERROR("template <typename T> CBufferOut& operator<<(CBufferOut& buffer, const CEnum<T>& type)", 
    256                                            <<"Buffer remain size is to low for size type") ; 
     257                                      << "Not enough free space in buffer to queue the enum."); 
    257258    return buffer ; 
    258259  } 
     
    262263  { 
    263264    if (!CEnum<T>(type).toBuffer(buffer)) ERROR("template <typename T> CBufferOut& operator<<(CBufferOut& buffer, const typename T::t_enum & type)", 
    264                                            <<"Buffer remain size is to low for size type") ;       
     265                                                << "Not enough free space in buffer to queue the enum."); 
    265266    return buffer ; 
    266267  } 
     
    269270  CBufferIn& operator>>(CBufferIn& buffer, CEnum<T>& type) 
    270271  { 
    271     if (! type.fromBuffer(buffer)) ERROR("template <typename T> CBufferIn& operator>>(CBufferIn& buffer, CEnum<T>& type)", 
    272                                            <<"Buffer remain size is to low for size type") ; 
     272    if (!type.fromBuffer(buffer)) ERROR("template <typename T> CBufferIn& operator>>(CBufferIn& buffer, CEnum<T>& type)", 
     273                                        << "Not enough data in buffer to unqueue the enum."); 
    273274    return buffer ; 
    274275  } 
Note: See TracChangeset for help on using the changeset viewer.