[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63806] catch block output is displayed after
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #63806] catch block output is displayed after text from rethrow (Matlab Compatibility) |
Date: |
Tue, 14 Feb 2023 11:31:06 -0500 (EST) |
Follow-up Comment #2, bug #63806 (project octave):
Interestingly, we are already trying to do the right thing here. Try this
code which adds a call to warning().
try
z = zeros (2^53,1);
catch ME
disp ('in catch block');
warning ("warning in catch block");
rethrow (ME);
end
which results in
in catch block
warning: warning in catch block
warning: called from
blah at line 5 column 3
error: out of memory or dimension too large for Octave's index type
error: called from
blah at line 2 column 5
So, apparently the warning function does flush stdout before proceeding.
Given that Octave is an exception state, performance isn't important. It
seems like rethrow() should borrow the code that warning() uses and flush
stdout before proceeding.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63806>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/