comparison scripts/optimization/optimset.m @ 10635:d1978e7364ad

Print name of function in error() string messages.
author Rik <octave@nomad.inbox5.com>
date Sun, 16 May 2010 22:26:54 -0700
parents eb63fbe60fab
children be55736a0783
comparison
equal deleted inserted replaced
10634:60542efcfa2c 10635:d1978e7364ad
47 ## Return defaults for named function. 47 ## Return defaults for named function.
48 fcn = varargin{1}; 48 fcn = varargin{1};
49 try 49 try
50 retval = feval (fcn, 'defaults'); 50 retval = feval (fcn, 'defaults');
51 catch 51 catch
52 error ("no defaults for function `%s'", fcn); 52 error ("optimset: no defaults for function `%s'", fcn);
53 end_try_catch 53 end_try_catch
54 elseif (nargs == 2 && isstruct (varargin{1}) && isstruct (varargin{2})) 54 elseif (nargs == 2 && isstruct (varargin{1}) && isstruct (varargin{2}))
55 ## Set slots in old from nonempties in new. Should we be checking 55 ## Set slots in old from nonempties in new. Should we be checking
56 ## to ensure that the field names are expected? 56 ## to ensure that the field names are expected?
57 old = varargin{1}; 57 old = varargin{1};