Re: IDL 8.0 bug -- line number of errors not given [message #72899 is a reply to message #72897] |
Tue, 12 October 2010 13:54   |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Oct 12, 4:45 pm, Chris Torrence <gorth...@gmail.com> wrote:
> This is by design. When developing the new graphics, we noticed that
> many of the error messages had overly-long stack traces, because
> on_error,2 always dumped out the stack trace from where the error
> message was triggered. We changed it in IDL 8.0, so that now it only
> prints out the stack trace from where IDL actually stops execution.
> For on_error,2 this is the "caller of the program unit that called
> ON_ERROR".
I was wondering if this was the case, since I agree this was
desirable. But because I saw no mention to it in the help, and I
happened to misread the test case above, I thought something could be
wrong.
Not showing the full trace is consistent with returning to the caller.
That is, the code below behaves as I expected, and agree that should
be the case:
function test1
On_error,2
a = bindgen(32)
c = long(a,30,1)
return,1
end
pro test
print,test1()
return
end
IDL> test
% Compiled module: TEST.
% Specified offset to array is out of range: A.
% Execution halted at: TEST 9 /home/penteado/idl/
test.pro
% $MAIN$
As the trace shows where the place where the routine with 'on_error,2'
was called.
|
|
|