Mercurial > octave-nkf
comparison libinterp/corefcn/balance.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 | f90c8372b7ba |
children |
comparison
equal
deleted
inserted
replaced
20616:fd0efcdb3718 | 20617:ba2b07c13913 |
---|---|
241 warning ("balance: used GEP, should have two output arguments"); | 241 warning ("balance: used GEP, should have two output arguments"); |
242 | 242 |
243 // Generalized eigenvalue problem. | 243 // Generalized eigenvalue problem. |
244 if (nargin == 2) | 244 if (nargin == 2) |
245 bal_job = "B"; | 245 bal_job = "B"; |
246 else if (args(2).is_string ()) | 246 else |
247 bal_job = args(2).string_value (); | 247 bal_job = args(2).string_value ("balance: OPT argument must be a string"); |
248 else | |
249 { | |
250 error ("balance: OPT argument must be a string"); | |
251 return retval; | |
252 } | |
253 | 248 |
254 if ((nn != args(1).columns ()) || (nn != args(1).rows ())) | 249 if ((nn != args(1).columns ()) || (nn != args(1).rows ())) |
255 { | 250 { |
256 gripe_nonconformant (); | 251 gripe_nonconformant (); |
257 return retval; | 252 return retval; |