Mercurial > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
20618:e5986cba4ca8 | 20619:eef93a493ce3 |
---|---|
1299 = read_text_data (is, std::string (), dummy, t2, j); | 1299 = read_text_data (is, std::string (), dummy, t2, j); |
1300 | 1300 |
1301 if (! is) | 1301 if (! is) |
1302 break; | 1302 break; |
1303 | 1303 |
1304 Cell tcell = t2.is_cell () ? t2.cell_value () : Cell (t2); | 1304 Cell tcell = t2.is_cell () ? t2.cell_value ("load: internal error loading class elements") : Cell (t2); |
1305 | |
1306 if (error_state) | |
1307 { | |
1308 error ("load: internal error loading class elements"); | |
1309 return false; | |
1310 } | |
1311 | 1305 |
1312 m.assign (nm, tcell); | 1306 m.assign (nm, tcell); |
1313 } | 1307 } |
1314 | 1308 |
1315 if (is) | 1309 if (is) |
1442 dummy, t2, doc); | 1436 dummy, t2, doc); |
1443 | 1437 |
1444 if (! is) | 1438 if (! is) |
1445 break; | 1439 break; |
1446 | 1440 |
1447 Cell tcell = t2.is_cell () ? t2.cell_value () : Cell (t2); | 1441 Cell tcell = t2.is_cell () ? t2.cell_value ("load: internal error loading class elements") : Cell (t2); |
1448 | |
1449 if (error_state) | |
1450 { | |
1451 error ("load: internal error loading class elements"); | |
1452 return false; | |
1453 } | |
1454 | 1442 |
1455 m.assign (nm, tcell); | 1443 m.assign (nm, tcell); |
1456 } | 1444 } |
1457 | 1445 |
1458 if (is) | 1446 if (is) |
1682 && (retval2 = H5Giterate (group_hid, name, ¤t_item, | 1670 && (retval2 = H5Giterate (group_hid, name, ¤t_item, |
1683 hdf5_read_next_data, &dsub)) > 0) | 1671 hdf5_read_next_data, &dsub)) > 0) |
1684 { | 1672 { |
1685 octave_value t2 = dsub.tc; | 1673 octave_value t2 = dsub.tc; |
1686 | 1674 |
1687 Cell tcell = t2.is_cell () ? t2.cell_value () : Cell (t2); | 1675 Cell tcell = t2.is_cell () ? t2.cell_value ("load: internal error loading class elements") : Cell (t2); |
1688 | |
1689 if (error_state) | |
1690 { | |
1691 error ("load: internal error loading class elements"); | |
1692 return false; | |
1693 } | |
1694 | 1676 |
1695 m.assign (dsub.name, tcell); | 1677 m.assign (dsub.name, tcell); |
1696 | 1678 |
1697 } | 1679 } |
1698 | 1680 |