Mercurial > hg > octave-nkf
changeset 20677:4bef1880098c
More specific warning messages when saving onCleanup variables.
* ov-oncleanup.cc (warn_save_load): Delete function
(save_ascii, save_binary, save_hdf5): Call warning() with message about inability to save onCleanup variables.
(load_ascii, load_binary, load_hdf5): Silently skip over instances of onCleanup
in file that were not truly saved.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 27 Aug 2015 15:19:20 -0700 |
parents | 16b9ec39ff46 |
children | 2f94652de9ff |
files | libinterp/octave-value/ov-oncleanup.cc |
diffstat | 1 files changed, 9 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-oncleanup.cc +++ b/libinterp/octave-value/ov-oncleanup.cc @@ -111,23 +111,18 @@ return retval; } -static void -warn_save_load (void) -{ - warning ("onCleanup: load and save not supported"); -} - bool octave_oncleanup::save_ascii (std::ostream& /* os */) { - warn_save_load (); + warning ("save: unable to save onCleanup variables, skipping"); + return true; } bool octave_oncleanup::load_ascii (std::istream& /* is */) { - warn_save_load (); + // Silently skip object that was not saved return true; } @@ -135,7 +130,8 @@ octave_oncleanup::save_binary (std::ostream& /* os */, bool& /* save_as_floats */) { - warn_save_load (); + warning ("save: unable to save onCleanup variables, skipping"); + return true; } @@ -143,7 +139,7 @@ octave_oncleanup::load_binary (std::istream& /* is */, bool /* swap */, oct_mach_info::float_format /* fmt */) { - warn_save_load (); + // Silently skip object that was not saved return true; } @@ -152,7 +148,8 @@ const char * /* name */, bool /* save_as_floats */) { - warn_save_load (); + warning ("save: unable to save onCleanup variables, skipping"); + return true; } @@ -160,7 +157,7 @@ octave_oncleanup::load_hdf5 (octave_hdf5_id /* loc_id */, const char * /* name */) { - warn_save_load (); + // Silently skip object that was not saved return true; }