Mercurial > octave-nkf
diff libinterp/octave-value/ov-class.cc @ 20619:eef93a493ce3
use new cell_value method to handle value extraction errors
* cellfun.cc, ov-class.cc, ov-struct.cc, ov-usr-fcn.cc:
Use new cell_value method.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 09 Oct 2015 14:43:36 -0400 |
parents | 729a85dafba8 |
children |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-class.cc Fri Oct 09 14:41:49 2015 -0400 +++ b/libinterp/octave-value/ov-class.cc Fri Oct 09 14:43:36 2015 -0400 @@ -1301,13 +1301,7 @@ if (! is) break; - Cell tcell = t2.is_cell () ? t2.cell_value () : Cell (t2); - - if (error_state) - { - error ("load: internal error loading class elements"); - return false; - } + Cell tcell = t2.is_cell () ? t2.cell_value ("load: internal error loading class elements") : Cell (t2); m.assign (nm, tcell); } @@ -1444,13 +1438,7 @@ if (! is) break; - Cell tcell = t2.is_cell () ? t2.cell_value () : Cell (t2); - - if (error_state) - { - error ("load: internal error loading class elements"); - return false; - } + Cell tcell = t2.is_cell () ? t2.cell_value ("load: internal error loading class elements") : Cell (t2); m.assign (nm, tcell); } @@ -1684,13 +1672,7 @@ { octave_value t2 = dsub.tc; - Cell tcell = t2.is_cell () ? t2.cell_value () : Cell (t2); - - if (error_state) - { - error ("load: internal error loading class elements"); - return false; - } + Cell tcell = t2.is_cell () ? t2.cell_value ("load: internal error loading class elements") : Cell (t2); m.assign (dsub.name, tcell);