Re: IDL 8.0 bug -- line number of errors not given [message #72959 is a reply to message #72861] |
Wed, 13 October 2010 15:07  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
Paulo Penteado wrote:
> On Oct 13, 5:53 pm, Paul van Delst <paul.vande...@noaa.gov> wrote:
>> Let me know if it works on your code...... :o)
>>
>> cheers,
>>
>> paulv
>>
>> p.s. A bloke I work with did exactly the same thing but using perl.
>
> I was considering a combination of xargs and sed. But if the debug
> keyword can work, that would not be necessary.
True - it would be a nice convention for debug keywords to exist in IDL routines in general... in some fashion. I
actually stick in an (also undocumented!) debug keyword in all my new IDL routines that control the error handling, i.e.
force any errors to cause execution to halt in the routine.
Regarding the ON_ERROR issue, it would be more difficult to do than a simple string substitution, but one could figure
out a way to modify their routines that do something like
PRO mywhatsit, arg1, arg2, etc...
ON_ERROR, 2
to
PRO mywhatsit, arg1, arg2, etc..., Debug=Debug
ON_ERROR, KEYWORD_SET(Debug) ? 0 : 2
Problem solved! :o)
cheers,
paulv
|
|
|