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

 
 

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

Submitted by:  Francesco Potortì <pot>
Submitted on:  Thu 02 Jun 2016 11:40:05 AM UTC  
 
Category: DocumentationSeverity: 2 - Minor
Priority: 5 - NormalItem Group: Documentation
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.0.2Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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:

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>
Project Member
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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lachlan (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by pot (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Jun 2016 02:39:22 PM UTCmtmillerCategoryInterpreter=>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.1-cleanup1