[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63545] Errors shown repeatedly when there is
From: |
Martynas |
Subject: |
[Octave-bug-tracker] [bug #63545] Errors shown repeatedly when there is an error in method size() |
Date: |
Sat, 17 Dec 2022 22:32:12 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?63545>
Summary: Errors shown repeatedly when there is an error in
method size()
Project: GNU Octave
Submitter: mpata
Submitted: Sun 18 Dec 2022 05:32:10 AM EET
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Release: 7.3.0
Discussion Lock: Any
Operating System: Any
Fixed Release: None
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sun 18 Dec 2022 05:32:10 AM EET By: Martynas <mpata>
Errors are shown repeatedly when there is an error in method size(). For
example, let's have a class, where method size() runs into an error (referring
to undefined variable A instead of property A; a relatively natural mistake if
one wants to have the size of an object to be reported equal to the size of
something else):
classdef TestObj
properties
A;
endproperties
methods
function [obj] = TestObj()
obj.A = 5;
endfunction
function [varargout] = size (obj, dimnr)
[numofrows, numofvars] = size (A);
endfunction
endmethods
end
Let's run a script that creates such an object and displays it (not even
calling size() explicitly):
[obj] = TestObj();
obj
The result (after actually showing an object) is an unending series of
errors:
>> error: 'A' undefined near line 11, column 38
error: called from
size at line 11 column 30
>> error: 'A' undefined near line 11, column 38
error: called from
size at line 11 column 30
This series is not even stopped by Ctrl+C.
Now, reporting one error would have been fine (while it might not be obvious
that method size() is going to be run when an object is merely being
displayed, at least that becomes somewhat clearer after seeing an error
message), but that should not result in such an infinite loop.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63545>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #63545] Errors shown repeatedly when there is an error in method size(),
Martynas <=