octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave warnings


From: Judd Storrs
Subject: Re: Octave warnings
Date: Thu, 20 Sep 2012 10:01:26 -0400



On Thu, Sep 20, 2012 at 9:18 AM, John W. Eaton <address@hidden> wrote:
On 20-Sep-2012, Judd Storrs wrote:

| A slightly different approach would be to change the available warning states
| from {"on", "off", "error"} to perhaps {"on", "off", "verbose", "error"}. So,
| for example
|
|     warning on Octave:broadcast
|
| would behave as it currently does and to get backtraces you could
|
|     warning verbose Octave:broadcast

That might be useful, but to request a stack trace, I think I would
use "backtrace" instead of "verbose".  Also, Matlab doesn't work that
way, so it introduces an incompatibility.  In Matlab, the "backtrace"
and "verbose" modes apparently only apply globally, not to individual
warning IDs.  For example,

  warning STATE MODE

in which STATE can be on, off, or query, and MODE can be verbose or
backtrace.  I'm not sure what "warning query verbose" is supposed to
do.  Octave should recognize these options now, but some of them have
no effect yet.

Ah, I forgot about compatibility with Matlab. But on second thought maybe fine-grained control isn't particularly desirable or useful. I can appreciate that when you want a backtrace, you probably want to have access to all the backtraces from all warnings anyway. So, I think breadcrumb warning messages are the superior approach and I would leave backtraces defaulted off. 

I'll plan on working on the documentation, breadcrumbs and testing your patch this weekend. I haven't sync'd or built from hg since early spring, so it may take me a bit to get back into the swing of things. Looks like a lot of good stuff's been happening!


--judd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]