[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #65557] Byte-code interpreter does not provide
From: |
Hendrik K |
Subject: |
[Octave-bug-tracker] [bug #65557] Byte-code interpreter does not provide full (recursive) set of error information in some cases |
Date: |
Fri, 5 Apr 2024 00:43:09 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?65557>
Summary: Byte-code interpreter does not provide full
(recursive) set of error information in some cases
Group: GNU Octave
Submitter: koerhen
Submitted: Fri 05 Apr 2024 04:43:09 AM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Missed Error or Warning
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: bytecode-evaluator
Discussion Lock: Any
Operating System: GNU/Linux
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Fri 05 Apr 2024 04:43:09 AM UTC By: Hendrik K <koerhen>
In certain cases the byte-code interpreter does not provide all information
from a thrown error. Especially the line number of the root cause error may be
missing (making debugging quite difficult).
Steps to reproduce with 2 function files
function ret = test1(in);
in_1 = in * 2;
if in_1 < 100
ret = cos(in);
else
ret = cos(in(2)); # causes error if "in" is a scalar
endif
endfunction
function ret = test2()
ret = arrayfun(@(x) test1(x),1:200,'uni',false);
endfunction
The thrown error message(s) do not show where the root cause error occurs and
in which line:
>> test2()
error: in(2): out of bound 1 (dimensions are 1x1)
When the byte-code interpreter is deactivated (do not forget to clear test1 +
test2), one sees the root cause error + line:
__vm_enable__(0);
clear test1 test2;
test2()
error: in(2): out of bound 1 (dimensions are 1x1)
error: called from
test1 at line 6 column 5
test2>@<anonymous> at line 2 column 23
test2 at line 2 column 3
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65557>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #65557] Byte-code interpreter does not provide full (recursive) set of error information in some cases,
Hendrik K <=