[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61842] New "too many inputs" error message wr
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions |
Date: |
Mon, 17 Jan 2022 19:02:02 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36 |
Follow-up Comment #9, bug #61842 (project octave):
@jwe: There is enough information to figure out where the error is. I just
thought it would be helpful to programmers to list the name of the anonymous
function in the same way we list the name of the function (if it is in an
m-file) that generated the error.
Below is a test script (also attached)
# Line 1
fanon = @() error ("calling error() from anonymous function");
# Line 5 next, error should be in column 5
# fanon ();
# Line 8 next, error should be in column 3
fanon (1);
When run with line 5 uncommented the output is
error: calling error() from anonymous function
error: called from
@<anonymous> at line 2 column 13
tst_line_num at line 5 column 5
Note that the call stack references both where the function was called (line
5, column 5) and also where the actual error was thrown (line 2, column 13).
When I comment out line 5 and let line 8 generate the error from the parser I
get
error: : function called with too many inputs
error: called from
@<anonymous>
tst_line_num at line 8 column 3
I still have the function invocation information, but not where the anonymous
function was defined. The extra information would be helpful if it is
available.
(file #52675)
_______________________________________________________
Additional Item Attachment:
File name: tst_line_num.m Size:0 KB
<https://file.savannah.gnu.org/file/tst_line_num.m?file_id=52675>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61842>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, Pantxo Diribarne, 2022/01/17
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, Markus Mützel, 2022/01/17
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, Markus Mützel, 2022/01/17
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, Rik, 2022/01/17
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, Pantxo Diribarne, 2022/01/17
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, Markus Mützel, 2022/01/17
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, Pantxo Diribarne, 2022/01/17
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, John W. Eaton, 2022/01/17
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, John W. Eaton, 2022/01/17
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions,
Rik <=
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, John W. Eaton, 2022/01/17
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, Markus Mützel, 2022/01/18
- [Octave-bug-tracker] [bug #61842] New "too many inputs" error message wrong with anonymous functions, Rik, 2022/01/18