Mercurial > octave
diff libinterp/octave-value/ov.cc @ 20704:571508c1ed06
eliminate more uses of error_state
* ov.h, ov.cc (octave_value::xall_strings): New extractor.
* bitfcns.cc, data.cc, ellipj.cc, fftn.cc, file-io.cc, filter.cc,
find.cc, graphics.cc, input.cc, load-path.cc, luinc.cc,
matrix_type.cc, oct-stream.cc, ordschur.cc, psi.cc, rand.cc,
spparms.cc, strfns.cc, symtab.cc, syscalls.cc, sysdep.cc, time.cc,
utils.cc, variables.cc, __glpk__.cc, __magick_read__.cc, amd.cc,
ov-cell.cc, ov-fcn-inline.cc, ov-struct.cc:
Eliminate more uses of error_state.
* system.tst: Update tests.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 14 Nov 2015 15:18:05 -0500 |
parents | 85e5efae848a |
children | a5ab31b52ae8 |
line wrap: on
line diff
--- a/libinterp/octave-value/ov.cc Sat Nov 14 12:07:38 2015 -0500 +++ b/libinterp/octave-value/ov.cc Sat Nov 14 15:18:05 2015 -0500 @@ -1994,6 +1994,7 @@ XVALUE_EXTRACTOR (uint64NDArray, xuint64_array_value, uint64_array_value) XVALUE_EXTRACTOR (std::string, xstring_value, rep->xstring_value) +XVALUE_EXTRACTOR (string_vector, xall_strings, all_strings) XVALUE_EXTRACTOR (Cell, xcell_value, cell_value) XVALUE_EXTRACTOR (Array<std::string>, xcellstr_value, cellstr_value) @@ -2958,10 +2959,9 @@ std::string& type_string, std::list<octave_value_list>& idx) { - const octave_map m = arg.map_value (); - - if (! error_state - && m.nfields () == 2 && m.contains ("type") && m.contains ("subs")) + const octave_map m = arg.xmap_value ("%s: second argument must be a structure with fields 'type' and 'subs'", name); + + if (m.nfields () == 2 && m.contains ("type") && m.contains ("subs")) { octave_idx_type nel = m.numel ();