[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55178] Improved debug on error behaviour insi
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions |
Date: |
Tue, 9 Nov 2021 13:13:47 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Follow-up Comment #15, bug #55178 (project octave):
Since debug_on_error only stops when executing interpreted code, I was
thinking that maybe the best solution was to make print_usage a built-in
function. Then calling it would behave the same as calling error. But then I
remembered that we can use
debug_on_error (true, "local");
to temporarily set the value of debug_on_error inside a function. So if we do
that inside the print_usage function, I think we'll get the desired behavior.
Can you try the following change and see whether it does what you expect?
diff --git a/scripts/help/print_usage.m b/scripts/help/print_usage.m
--- a/scripts/help/print_usage.m
+++ b/scripts/help/print_usage.m
@@ -82,6 +82,7 @@ function print_usage (name)
warning ("print_usage: raw Texinfo source of help text follows...\n");
endif
+ debug_on_error (false, "local");
if (at_toplev)
error ("Octave:invalid-fun-call",
"Invalid call to %s. Correct usage is:\n\n%s\n%s",
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55178>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, (continued)
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Georg Wiora, 2021/11/08
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Georg Wiora, 2021/11/08
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Markus Mützel, 2021/11/08
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Georg Wiora, 2021/11/08
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Markus Mützel, 2021/11/08
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Kai Torben Ohlhus, 2021/11/08
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Georg Wiora, 2021/11/08
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Markus Mützel, 2021/11/09
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Georg Wiora, 2021/11/09
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Markus Mützel, 2021/11/09
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions,
John W. Eaton <=
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Georg Wiora, 2021/11/10
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Georg Wiora, 2021/11/10
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, John W. Eaton, 2021/11/10
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Georg Wiora, 2021/11/10
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Markus Mützel, 2021/11/10
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, John W. Eaton, 2021/11/10
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, John W. Eaton, 2021/11/10
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, Georg Wiora, 2021/11/10
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, John W. Eaton, 2021/11/10
- [Octave-bug-tracker] [bug #55178] Improved debug on error behaviour inside octave core functions, anonymous, 2021/11/11