help-octave
[Top][All Lists]
Advanced

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

Re: wavread problems


From: John W. Eaton
Subject: Re: wavread problems
Date: Thu, 12 May 2005 01:55:32 -0400

On 11-May-2005, Keith Goodman wrote:

| On 5/11/05, John W. Eaton <address@hidden> wrote:
| > Perhaps.  Can you suggest a way of doing that?
| 
| I only need one line number per function in the error traceback. That
| is, I don't need to know that the line the error occured on is inside
| a "for" loop that is itself inside an "if" statement, etc.
| 
| If that's the case for most users, then here's another alternative
| that also prints (verbose mode?) a snippet of code as it does the
| traceback:
| 
| ERROR: `fidy' undefined
| /big/long/directory/path/myfunction.m
|     Line 86 column 13:
|     y = exp (sum (log (x), dim) / n);

We don't save the text of the function (it may have come from the
command line).  But if the function was defined in a .m file, then I
suppose you could find the text of the line where the error occurred.

OTOH, given the current structure of the interpreter, generating these
kinds of messages would not be simple to do because when the "called
from" message is printed we no longer know what line we were
evaluating when the error occured.  That's why the current traceback
messages are verbose.

jwe



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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