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

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

[Octave-bug-tracker] [bug #55939] 'dbstop if error' stops in function st


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #55939] 'dbstop if error' stops in function str2num, when no error is present
Date: Fri, 22 Mar 2019 15:19:26 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36

Follow-up Comment #9, bug #55939 (project octave):

I think in Matlab, eval with two arguments is deprecated and no longer
documented. But testing does show that it still works, and acts like a
try-catch, suppresses an error in the first argument from being raised, and
evaluates the second argument.

I think eval with one argument does propagate an error normally, and probably
triggers a breakpoint too.

I think Andrew's suggestion is that we should avoid using the 2-argument form
completely and rely on try-catch instead.

The bottom line in this bug report is still that str2num should not raise an
error and should not trigger a breakpoint even if the input argument is not a
valid number, however that gets done. Easiest seems to be adding a try-catch
and using eval with 1 argument.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55939>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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