octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45496] "error: no default value for argument"


From: Rik
Subject: [Octave-bug-tracker] [bug #45496] "error: no default value for argument" fails to give function/line number/etc
Date: Tue, 04 Aug 2015 22:09:52 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0

Update of bug #45496 (project octave):

                  Status:               Confirmed => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #3:

I'm not exactly sure why Octave even had the newline on this error message
which was suppressing the backtrace.  If you look at other calls to error()
within the file pt-misc.cc they do not use a newline.  Similarly, using grep
'error (' in the parse-tree directory this was the only example which ended in
a newline.  So, I'm guessing this was just an oversight.  I removed the
newline and now Octave prints a backtrace for this error.  The line number and
column number are wrong because Octave has not actually started to parse the
function so it returns -1 for these values.  But I found it enough for
debugging to see


error: no default value for argument 1
error: called from
    myf at line -1 column -1


where the function was in the file myf.m

The change was made on the default branch here
(http://hg.savannah.gnu.org/hgweb/octave/rev/58b02a8d0fe9) and will be part of
the 4.2 release of Octave.  If you need it immediately you can compile from
source code.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45496>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]