Changeset 833 for XIOS/trunk/src/io/netCdfInterface_impl.hpp
- Timestamp:
- 04/08/16 15:00:15 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/io/netCdfInterface_impl.hpp
r686 r833 32 32 { 33 33 StdStringStream sstr; 34 StdString varName; 34 35 sstr << "Error when calling function ncGetAttType(ncid, varId, attrName.c_str(), data)" << std::endl; 35 36 sstr << nc_strerror(status) << std::endl; 36 sstr << "Unable to read attribute " << attrName << " given the location id: " << ncid << " and the variable id: " << varId << std::endl; 37 inqVarName(ncid, varId, varName); 38 sstr << "Unable to read attribute " << attrName << " given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl; 37 39 throw CNetCdfException(sstr.str()); 38 40 } … … 59 61 { 60 62 StdStringStream sstr; 63 StdString varName; 61 64 sstr << "Error when calling function ncPutAttType(ncid, varId, attrName.c_str(), numVal, data)" << std::endl; 62 65 sstr << nc_strerror(status) << std::endl; 63 sstr << "Unable to set attribute " << attrName << " given the location id: " << ncid << " and the variable id: " << varId 66 inqVarName(ncid, varId, varName); 67 sstr << "Unable to set attribute " << attrName << " given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl 64 68 << " with " << numVal << " elements." << std::endl; 65 69 throw CNetCdfException(sstr.str()); … … 85 89 { 86 90 StdStringStream sstr; 91 StdString varName; 87 92 sstr << "Error when calling function ncGetVaraType(ncid, varId, start, count, data)" << std::endl; 88 93 sstr << nc_strerror(status) << std::endl; 89 sstr << "Unable to read data given the location id: " << ncid << " and the variable id: " << varId << std::endl; 94 inqVarName(ncid, varId, varName); 95 sstr << "Unable to read data given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl; 90 96 throw CNetCdfException(sstr.str()); 91 97 } … … 110 116 { 111 117 StdStringStream sstr; 118 StdString varName; 112 119 sstr << "Error when calling function ncPutVaraType(ncid, varId, start, count, data)" << std::endl; 113 120 sstr << nc_strerror(status) << std::endl; 114 sstr << "Unable to write data given the location id: " << ncid << " and the variable id: " << varId << std::endl; 121 inqVarName(ncid, varId, varName); 122 sstr << "Unable to write data given the location id: " << ncid << " and the variable whose id: " << varId << " and name: " << varName << std::endl; 115 123 throw CNetCdfException(sstr.str()); 116 124 }
Note: See TracChangeset
for help on using the changeset viewer.