bugGNU Octave - Bugs: bug #48090, warning ("query", ID)...

 
 

bug #48090: warning ("query", ID) returns a structure with undocumented fields

Submitter:  Francesco Potortì <pot>
Submitted:  Thu 02 Jun 2016 11:40:05 AM UTC
   
 
Category:  Documentation Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Documentation
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.0.2 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 04 Mar 2019 01:09:30 AM UTC, comment #3: 

The current doc string for the 'warning' function documents the type of the return value:


The optional output argument WARNING_STRUCT is a structure or
structure array with fields "state" and "identifier".


Mike Miller <mtmiller>
Group Member
Tue 05 Jul 2016 04:51:52 PM UTC, comment #2: 

After the help for 'query' add something like this:

'query' returns a struct with two fields:
- identifier, which is a string containing the ID name of the warning
- state, which is astring whose contents is one of 'on', 'off', 'error'


After the help for 'local' add something like this:

If you want to disable a warning only around some lines of code, using 'local' may be too coarse. In this case, you can write something along these lines:

  prev = warning('query', 'Octave:divide-by-zero');
  warning('off', 'Octave:divide-by-zero');
  ...
  warning(prev.state, 'Octave:divide-by-zero');

Francesco Potortì <pot>
Wed 15 Jun 2016 08:08:02 AM UTC, comment #1: 

When I run the command, I get a structure with two fairly self-explanatory fields:


warning query Octave:language-extension
ans =

  scalar structure containing the fields:

    identifier = Octave:language-extension
    state = off


If that is also what you get, and you would like more documentation, could you write a draft of the documentation you would like?

Is there some more information that you need in order to write the documentation?

Lachlan Andrew <lachlan>
Thu 02 Jun 2016 11:40:05 AM UTC, original submission:  

Using the warning() function to query the status of a warning returns a structure which is completely undocumented

Francesco Potortì <pot>

 

(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 mtmiller (Updated the item)
  • -email is unavailable- added by pot (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-04 mtmiller StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2016-06-02 mtmiller CategoryInterpreter Documentation
        Severity3 - Normal 2 - Minor
        StatusNone Confirmed
        Summaryquerying the status of a waringn returns an andocumented structure warning ("query", ID) returns a structure with undocumented fields

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code