Re: IDL 8.0 bug -- line number of errors not given [message #72891 is a reply to message #72890] |
Tue, 12 October 2010 19:46   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Paulo Penteado writes:
> I was wondering if this was the case, since I agree this was
> desirable.
Humm. In what sense of the word do you find this "desirable"?
>
> Not showing the full trace is consistent with returning to the caller.
Returning to the caller for what purpose?
> That is, the code below behaves as I expected, and agree that should
> be the case:
Why is this what you expected? Because of your experience
with other software? What other software acts like this?
You thought IDL's behavior in the past was inconsistent with
good programming practices?
>
> 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.
Well, I agree this is the place it was called. But what possible
good is this information? How would you use this information?
Why would you use ON_ERROR, 2? Should it be eliminated from
the language? How would you use it now that it is working
as you expect it to?
I truly do not understand how this can be a good thing.
I'm all ears.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|