Re: IDL 8.0 bug -- line number of errors not given [message #72901 is a reply to message #72900] |
Tue, 12 October 2010 12:45   |
chris_torrence@NOSPAM
Messages: 528 Registered: March 2007
|
Senior Member |
|
|
On Oct 12, 12:11 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Oct 12, 2:35 pm, wlandsman <wlands...@gmail.com> wrote:
>
>> I'm not sure if this IDL 8.0 bug has been mentioned. (At least I
>> think it is a bug -- perhaps someone can convince me that it is a
>> feature.)
>
> I had not noticed this before. It seems to only happen when 'on_error,
> 2' is used.
Hi all,
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".
The general philosophy is that on_error,2 should be used for "library"
routines, where the caller should not need to care about the internal
workings of the library. If you are writing your own routines, or are
debugging an existing routine, then I would recommend that you disable
the on_error,2 command until you have completed your routine and are
ready to "release" it. I think the IDL help for ON_ERROR mentions
this.
Two points:
* There was a bug in IDL 8.0, where this change also affected on_error,
1. This has been fixed in the upcoming patch - on_error,1 will again
behave the way it did before.
* This change in behavior was unfortunately left out of the release
notes and the documentation. This has been corrected.
Hope this hasn't caused too much confusion.
Cheers,
Chris
ITTVIS
|
|
|