bugGNU Octave - Bugs: bug #39439, Matlab warning and error IDs are...

 
 

bug #39439: Matlab warning and error IDs are not recognized

Submitter:  John W. Eaton <jwe>
Submitted:  Mon 08 Jul 2013 11:25:11 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  None Assigned to:  None
Originator Name:  jwe Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 25 Feb 2016 10:19:15 PM UTC, comment #5: 

One of the projects on the project page is to give all Octave errors/warnings an ID.  Would it be sensible to try to harmoinze Octave and Matlab IDs at the same time?

I'm not sure if TMW has copyrighted their message IDs, but for short ones (like singular matrix) that are presumably too short to copyright, it would nice for Octave's ID to be the same as Matlab's ID, subject to the "Octave:" prefix and spinal-case replacing camelCase.

For the project on adding IDs, would the goal be to have a small set of IDs used in multiple places, or for each customized error to have its own ID?  There are already different error messages that have the same ID (like for non-conformable operands, where the message indicates the operator and the operand sizes).  How far should that extend?

Lachlan Andrew <lachlan>
Mon 03 Feb 2014 04:22:19 PM UTC, comment #4: 

Yes, the preferred style for Octave warning and error IDs is "Octave" followed by a colon followed by a series of words separated by hyphens.

John W. Eaton <jwe>
Group administrator
Mon 03 Feb 2014 01:40:22 PM UTC, comment #3: 

just for the record, Matlab's are CamelCase, e.g., 'MATLAB:UndefinedFunction' vs. 'Octave:undefined-function' (real examples).

Felipe G. Nievinski <fgnievinski>
Mon 03 Feb 2014 01:05:56 PM UTC, comment #2: 

some guidelines about the style of error identifiers would help. it seems the preferred style is "spinal-case", as in "Octave:singular-matrix-div", although I've seen some in CamelCase, as in "Octave:sqrtm:SingularMatrix".

Felipe G. Nievinski <fgnievinski>
Sun 29 Dec 2013 07:31:04 PM UTC, comment #1: 

I think users could accommodate different ids, e.g.:

    octave:37> ones(2) \ [1;1];  [msg, id] = lastwarn ()
    msg = warning: matrix singular to machine precision, rcond = 0
    id = Octave:singular-matrix-div

provided they were always non-empty, unlike this:

    octave:36> inv(ones(2));  [msg, id] = lastwarn ()
    msg = warning: inverse: matrix singular to machine precision, rcond = 0
    id =

it'd be pretty widespread change though...

Felipe G. Nievinski <fgnievinski>
Mon 08 Jul 2013 11:25:11 AM UTC, original submission:  

Matlab users who use things like


warning off Matlab:singularMatrix


probably expect to have warnings about singlar matrices disabled.  We have separate warning IDs for Octave that serve the same purpose.  Perhaps we should attempt to recognize Matlab warning and error IDs by doing some translation.  For example, by converting MATLAB:singularMatrix to Octave:singular-matrix.

John W. Eaton <jwe>
Group administrator

 

(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 lachlan (Posted a comment)
  • -email is unavailable- added by fgnievinski (Posted a comment)
  • -email is unavailable- added by jwe (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code