Re: IDL 8.0 bug -- line number of errors not given [message #72900 is a reply to message #72899] |
Tue, 12 October 2010 12:58   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Chris Torrence writes:
> 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.
No, no, no. This is NOT what I want at all! Oh, dear.
Twenty years of error handling down the drain.
I'm going to have to think about this some, but my
first reaction is that this is NOT a good idea. :-(
The source of errors when working with objects (as I am
sure you know as well as I do) are often a LONG way away
from where the error manifests itself. I think this has
the possibility of making debugging impossibly hard.
Oh, dear!
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|