[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54707] "which" on a function with syntax erro
From: |
Markus Mützel |
Subject: |
[Octave-bug-tracker] [bug #54707] "which" on a function with syntax error shouldn't throw an error |
Date: |
Fri, 21 Sep 2018 15:19:28 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0 |
URL:
<https://savannah.gnu.org/bugs/?54707>
Summary: "which" on a function with syntax error shouldn't
throw an error
Project: GNU Octave
Submitted by: mmuetzel
Submitted on: Fri 21 Sep 2018 07:19:26 PM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
When calling "which" for a function that cannot be parsed, an error is
thrown.
In Octave 4.4.1 and a recent dev:
>> which test_wrong
parse error near line 1 of file D:\temp\test_wrong_syntax.m
syntax error
>>> function 5 = test_wrong_syntax()
^
error: called from
which at line 34 column 5
Matlab doesn't throw an error when calling "which" for this file:
>> type test_wrong_syntax
function 5 = test_wrong_syntax()
end
>> test_wrong_syntax
Error: File: test_wrong_syntax.m Line: 1 Column: 10
Unexpected MATLAB expression.
>> which test_wrong_syntax
D:\temp\test_wrong_syntax.m
>>
Also in Octave:
>> which test_wrong_syntax.m
'test_wrong_syntax.m' is the file D:\temp\test_wrong_syntax.m
See also bug #54600 where Pantxo wrote: "Personally, what I want when I use
"which fcn" is Octave to answer the question "In which file will you search
for the definition of fcn?"." to which I agree.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 21 Sep 2018 07:19:26 PM UTC Name: test_wrong_syntax.m Size: 38B
By: mmuetzel
<http://savannah.gnu.org/bugs/download.php?file_id=45073>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?54707>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54707] "which" on a function with syntax error shouldn't throw an error,
Markus Mützel <=