bugGNU Octave - Bugs: bug #58648, Wrong error message using tfdata...

 
 

bug #58648: Wrong error message using tfdata with non lti model arguments [control package 3.2.0 ]

Submitted by:  None
Submitted on:  Tue 23 Jun 2020 02:43:38 PM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Missed Error or Warning
Status:  None Assigned to:  None
Originator Name:  Luiz Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  5.2.0
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Tue 30 Jun 2020 10:54:20 PM UTC, comment #8: 

I think this may depend on the ability to look for all overloads of a given function name with the "which -all" command, see bug #32088.

After that information is available, the unimplemented hook can use which -all to find that 'tfdata' or any other function is a method of one or more classes on the load path, and give a better diagnostic message.

Mike Miller <mtmiller>
Project Administrator
Tue 23 Jun 2020 11:01:58 PM UTC, comment #7: 

I was thinking the same a JWE. We need a case statement for the functions that are truly unimplemented, and a second case statement for this case  ---> already implemented but not called correctly. Who would maintain this  -- the pkg maintainers or?

Doug Stewart <dastew>
Tue 23 Jun 2020 09:17:45 PM UTC, comment #6: 

I guess that's a general problem with the unimplemented function and that it could show a different message for functions that are available in packages for some class of inputs vs. functions that are not known to be available for any class of inputs.

John W. Eaton <jwe>
Project Administrator
Tue 23 Jun 2020 07:27:05 PM UTC, comment #5: 

Now reading with more attention the output:
--------------------------
tfdata(1)

warning: 'tfdata' is a method of class 'lti'; it must be called with a 'lti'
argument (see 'help @lti/tfdata').

Please read <https://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
error: 'tfdata' undefined near line 1 column 1
----------------------------------

The modification change the warning to the correct one:

warning: 'tfdata' is a method of class 'lti'; it must be called with a 'lti' argument (see 'help @lti/tfdata').

However the error message still referring to a missing functionality:

Please read <https://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
error: 'tfdata' undefined near line 1 column 1

Thanks again.

Luiz Antonio Maccari Junior <luiz>
Tue 23 Jun 2020 07:15:36 PM UTC, comment #4: 

I tested the modification too and it seems to work well. Now it shows the correct error message.

Will this correction be implemented in the next octave or control package update?

What I have to do in order to close the bug report?

Thanks by attention.

Luiz Antonio Maccari Junior <luiz>
Tue 23 Jun 2020 04:08:05 PM UTC, comment #3: 

_unimplemented_ needs to be changed at about line 128  to:

         classes = {"lti"};
      txt = check_package (fcn, "control",classes);

I tried it and got this warning message.

warning: 'tfdata' is a method of class 'lti'; it must be called with a 'lti'
argument (see 'help @lti/tfdata').

Doug Stewart <dastew>
Tue 23 Jun 2020 03:07:42 PM UTC, comment #2: 

If tfdata is only defined for some classes (@lti/tfdata.m, for example) then those class methods will never be called for other types of objects.

I guess the unimplemented function needs to know more about class methods instead of assuming that all unresolved functions are missing.

John W. Eaton <jwe>
Project Administrator
Tue 23 Jun 2020 03:01:36 PM UTC, comment #1: 

I took a quick look at this, and the interpreter send it to
 _unimplemented_ (fcn)

And  _unimplemented_ (fcn)
 produces this error message.
Perhaps the interpreter should do something else.

Doug Stewart <dastew>
Tue 23 Jun 2020 02:43:38 PM UTC, original submission:  

When I put a non lti model as input argument I receive an wrong error message.

Example:

TF=1;
tfdata(TF)

Output:

---------------

warning: the 'tfdata' function belongs to the control package from Octave Forge but has not yet been implemented.

Please read <https://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
error: 'tfdata' undefined near line 1 column 1
--------------------------------------------------------

However the function is already implemented and works well with lti models as it input.

My suggestion is change the message in order to the users avoid input classes other than lti models.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by luiz (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by dastew (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    No changes have been made to this item

    Back to the top


    Powered by Savane 3.5