Mercurial > octave-nkf
comparison libinterp/corefcn/oct-hist.cc @ 20617:ba2b07c13913
use new string_value method to handle value extraction errors
* __dispatch__.cc, balance.cc, colloc.cc, conv2.cc, data.cc, debug.cc,
graphics.cc, input.cc, matrix_type.cc, oct-hist.cc, schur.cc,
spparms.cc, symtab.cc, sysdep.cc, toplev.cc, utils.cc:
Use new string_value method.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 09 Oct 2015 10:06:39 -0400 |
parents | a9574e3c6e9e |
children |
comparison
equal
deleted
inserted
replaced
20616:fd0efcdb3718 | 20617:ba2b07c13913 |
---|---|
169 if (option == "-r" || option == "-w" || option == "-a" | 169 if (option == "-r" || option == "-w" || option == "-a" |
170 || option == "-n") | 170 || option == "-n") |
171 { | 171 { |
172 if (i < nargin - 1) | 172 if (i < nargin - 1) |
173 { | 173 { |
174 if (args(i+1).is_string ()) | 174 std::string fname |
175 command_history::set_file (args(++i).string_value ()); | 175 = args(++i).string_value ("history: expecting file name for %s option", |
176 else | 176 option.c_str ()); |
177 { | 177 |
178 error ("history: expecting file name for %s option", | 178 command_history::set_file (fname); |
179 option.c_str ()); | |
180 return hlist; | |
181 } | |
182 } | 179 } |
183 else | 180 else |
184 command_history::set_file (default_history_file ()); | 181 command_history::set_file (default_history_file ()); |
185 | 182 |
186 if (option == "-a") | 183 if (option == "-a") |