bugGNU Octave - Bugs: bug #54375, warning ("backtrace")...

 
 

bug #54375: warning ("backtrace") incompatible with undocumented Matlab behavior

Submitter:  Arnaud Delorme <arnodelorme>
Submitted:  Wed 25 Jul 2018 02:15:23 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Arno Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 01 Aug 2018 06:56:10 PM UTC, comment #4: 

Yes, I think it is the same for all predefined warning types (I have just
checked under Matlab with ?verbose? and it behaves the same as 'backtrace' outlined below).
The single input is the most annoying because the behavior of Matlab and Octave is (very) different.

Arnaud Delorme <arnodelorme>
Wed 01 Aug 2018 05:42:45 PM UTC, comment #3: 

Arnaud replied by mail:


Yes, I think it is the same for all predefined warning types (I have just checked under Matlab with ?verbose? and it behaves the same as ?backtrace? outlined below).
The single input is the most annoying because the behavior of Matlab and Octave is (very) different.


Arnaud:  Please use the web interface to add comments to bug reports.  Email replies don't appear in the bug tracker where they are most useful.

John W. Eaton <jwe>
Group administrator
Wed 25 Jul 2018 06:50:55 PM UTC, comment #2: 

So, to be clear, in Matlab the following are equivalent?


warning('backtrace')         <===>  warning('query', 'backtrace')
warning('backtrace', 'on')   <===>  warning('on', 'backtrace')
warning('backtrace', 'off')  <===>  warning('off', 'backtrace')


Does this also apply to the 'verbose' setting?

Mike Miller <mtmiller>
Group Member
Wed 25 Jul 2018 03:58:30 PM UTC, comment #1: 

Matlab doesn't document this.  See http://www.mathworks.com/help/matlab/ref/warning.html.

Octave generally doesn't bother to follow undocumented Matlab behavior because it can change from version to version, and the documented solution is always available.

Marking as confirmed, but lowering the priority since there are easy ways to code the functionality that are guaranteed to work.

Rik <rik5>
Group administrator
Wed 25 Jul 2018 02:15:23 PM UTC, original submission:  

Matlab allows to change the order of the warning parameters but Octave does not (Octave generates an error).

warning('backtrace’, ‘on’) not possible in Octave
warning('backtrace’, ‘off’) not possible in Octave

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

In Matlab

warning('backtrace')

is equivalent to

warning('query', 'backtrace')

(in Octave, it sets the warning message to a different value which is very confusing at first)

Arnaud Delorme <arnodelorme>

 

(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 jwe (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by arnodelorme (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.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-25 rik5 Priority5 - Normal 3 - Low
        StatusNone Confirmed
        Release4.4.0 dev
        Operating SystemMac OS Any
        SummaryWarning backtrace Matlab compatibility warning ("backtrace") incompatible with undocumented Matlab behavior

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code