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

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

[Octave-bug-tracker] [bug #55178] Improved debug on error behaviour insi


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions
Date: Tue, 9 Nov 2021 11:23:11 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 Edg/95.0.1020.44

Follow-up Comment #14, bug #55178 (project octave):

I just double-checked in Matlab R2021a. It *does* stop in its own .m files at
errors after `dbstop if error`.
That is consistent with what happens in Octave.

The function `print_usage` is a convenience function that is used in many
functions in Octave core and in many packages. It prints the part of the help
string that shows the supported calling forms before it raises an error.
As you probably can imagine, the function is used when it is pretty clear that
the user called the function in a wrong form.
Telling the user how to call the function instead is actually a nice feature
imho.

As far as I can tell, Matlab just emits an error without telling the user
which calling forms can be used.

You could probably start a poll on discourse whether Octave should get rid of
`print_usage` and instead just throw an error in these cases like Matlab does.
But I can already tell you that I personally strongly favor Octave's current
behavior.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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