Mercurial > octave
changeset 30276:63147d7d53a0
improve debug_on_error behavior with print_usage (bug #55178)
* print_usage.m: Set debug_on_error to false locally before emitting
final error.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 10 Nov 2021 10:38:12 -0500 |
parents | cf434923aec0 |
children | f816a8c44924 |
files | scripts/help/print_usage.m |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/help/print_usage.m Thu Nov 04 19:39:56 2021 +0100 +++ b/scripts/help/print_usage.m Wed Nov 10 10:38:12 2021 -0500 @@ -82,6 +82,13 @@ warning ("print_usage: raw Texinfo source of help text follows...\n"); endif + ## We don't want to start the debugger here if debug_on_error is true + ## so we set it to false and make the change local. Then + ## debug_on_error will be reset to true after this function returns + ## and the debugger will start at the location of the call to + ## print_usage. + 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",