help-octave
[Top][All Lists]
Advanced

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

Re: No traceback with error message (4.0.0-rc3, Windows 7 64bit)


From: Mike Miller
Subject: Re: No traceback with error message (4.0.0-rc3, Windows 7 64bit)
Date: Fri, 17 Apr 2015 07:33:39 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Apr 17, 2015 at 10:55:49 +0200, Martin Kunz wrote:
> Hi,
> 
> One thing that complicates using Octave 4.0.0-rc3 on my computer is that
> no traceback messages are printed when an error occurs. Consider a
> simple testScript.m with the following content:
> 
> a=1;
> a(2);
> 
> When I run this script with Octave 3.8.2 I get:
> 
>  >> testScript
> error: testScript: A(I): index out of bounds; value 2 out of bound 1
> error: called from:
> error:   D:\scripting\octave\octaveScripts\testScript.m at line 2, column 1
> 
> However, Octave 4.0.0-rc3 prints:
> 
>  >> testScript
> error: testScript: A(I): index out of bounds; value 2 out of bound 1
> 
> and no traceback. Is there a switch to activate the traceback?

I don't know, but I suspect something has changed so that a stack trace
is no longer shown for scripts, but is still shown for function files.

If you convert your script into a function, the function name, line, and
column are shown.

You can always use the lasterror function to get full information about
the stack at the point of the last error message.

-- 
mike



reply via email to

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