From: alex <aba...@us...> - 2006-06-07 22:10:43
|
Update of /cvsroot/octave/octave-forge/main/octcdf In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1037 Modified Files: ov-ncvar.cc Log Message: Bug fix: octcdf now recovers gracefully after an unkown index specification Index: ov-ncvar.cc =================================================================== RCS file: /cvsroot/octave/octave-forge/main/octcdf/ov-ncvar.cc,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ov-ncvar.cc 2 May 2006 14:51:41 -0000 1.9 +++ ov-ncvar.cc 5 Jun 2006 16:40:07 -0000 1.10 @@ -245,6 +245,8 @@ octave_value_list key_idx = *idx.begin(); std::list<Range> ranges = get_slice(key_idx); + if (error_state) return retval; + ov_nc_put_vars(get_ncid(),get_varid(),ranges,get_nctype(),scaledrhs); retval = rhs; @@ -311,6 +313,8 @@ octave_value_list key_idx = idx.front(); std::list<Range> ranges = get_slice(key_idx); + if (error_state) return retval; + retval = ov_nc_get_vars(get_ncid(),get_varid(),ranges,get_nctype()); if (autonan()) { @@ -433,6 +437,7 @@ } else { error("octcdf: unknown index specification: type %s",key_idx(i).type_name().c_str()); + return ranges; } } } |