help-octave
[Top][All Lists]
Advanced

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

debug_on_error results in lost location information


From: John W. Eaton
Subject: debug_on_error results in lost location information
Date: Wed, 8 Sep 2004 20:07:04 -0400

On  8-Sep-2004, Keith Goodman <address@hidden> wrote:

| The location information that Octave prints after encountering an
| error is useful for debugging.
| 
| octave:1> myfunc
| error: sort: wrong type argument `cell'
| error: evaluating if command near line 59, column 3
| error: called from `unique' in file
| `/usr/share/octave/2.1.57/site/m/octave-forge/set/unique.m'
| error: evaluating assignment expression near line 47, column 5
| error: called from `myfunc2' in file `/home/me/code/myfunc2.m'
| 
| Asking Octave to enter the debug mode when it encounters an error is
| also useful.
| 
| octave:2> debug_on_error = 1;
| octave:3> myfunc
| error: sort: wrong type argument `cell'
| error: in 
/usr/lib/octave/2.1.57/site/oct/i386-pc-linux-gnu/octave-forge/sort.oct
| near line 66, column 12:
| 
| >>> [y, i] = sort (y);
| 
| 
| debug>
| 
| Both methods are useful. But, as of Octave 2.1.57, you cannot use both
| methods at the same time.
| 
| Notice that when 'debug_on_error = 1' Octave does not print where the
| function 'sort' was called from (it was called from unique which in
| turn was called from myfunc2). And that when  'debug_on_error = 0' the
| line number where the error occured in sort is not given.

This would not be easy to fix, given the way that Octave's evaluator
works and the way that traceback information is printed.

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]