help-octave
[Top][All Lists]
Advanced

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

usage of error_text


From: John W. Eaton
Subject: usage of error_text
Date: Mon, 10 Apr 2000 12:52:24 -0500 (CDT)

On  9-Apr-2000, etienne grossmann <address@hidden> wrote:

|   sorry for mailing prematurely. I think I got it : the name of the
|   variable is '__error_text__'.
| 
|   I wanted to use it in order to do something like :
| 
|   function bar()
|     ...
|     if some_error_condition,
|        try error("bar") ; 
|        catch
|          printf( __error_text__ );    ## Show the all the calling functions
|        end
|        keyboard
|    end
| 
|    So that I could both know what the callig functions are, and also
|    inspect the local variables. Afaik, this is not currently possible;
|    am I right? 

I think the problem is that you expect too much from __error_text__.
It only includes the messages generated inside the try block.  The
traceback messages are generated as Octave returns to the root of the
expression or statement tree that is currently being evaluated, so at
the point of your printf statement above, no traceback information is
available yet.

jwe



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

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



reply via email to

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