[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 10:45:08 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?63806>
Summary: catch block output is displayed after text from
rethrow (Matlab Compatibility)
Project: GNU Octave
Submitter: rik5
Submitted: Tue 14 Feb 2023 07:45:06 AM PST
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: Confirmed
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: dev
Discussion Lock: Any
Operating System: GNU/Linux
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Tue 14 Feb 2023 07:45:06 AM PST By: Rik <rik5>
Sample code:
try
z = zeros (2^53,1);
catch ME
disp ('in catch block');
rethrow (ME);
end
When run in Octave it produces the output:
error: out of memory or dimension too large for Octave's index type
error: called from
tst_rethrow_ordering at line 2 column 5
in catch block
In Matlab, the code in the catch block that precedes the rethrow () call is
executed first and printed first. This seems more logical as execution is
from top to bottom.
One can resolve this by adding "fflush (stdout)" before the call to rethrow(),
but it would probably be better to have rethrow do the flushing.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 14 Feb 2023 07:45:06 AM PST Name: tst_rethrow_ordering.m Size: 82B
By: rik5
<http://savannah.gnu.org/bugs/download.php?file_id=54356>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63806>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63806] catch block output is displayed after text from rethrow (Matlab Compatibility),
Rik <=