comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: CATCH error problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: CATCH error problem [message #65999] Wed, 08 April 2009 09:21 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
David Fanning wrote:
> lbusett@yahoo.it writes:
>
>> The first time that an error in data transfer occurs, the "catch"
>> procedure kicks in correctly, the counter is incremented and another
>> attempt is made. However, if another data transfer error occurs the
>> CATCH procedure does not kick in any more, and the program exits with
>> an error.
>>
>> Does anyone know why is it happening ? Is there a "smarter" way to do
>> the job ?
>
> You are cancelling the CATCH in the first line of
> the CATCH error handler. If you want CATCH to
> remain in effect, don't do this. :-)
>
> Cheers,
>
> David
>
> P.S. Just be sure your error handling code is correct
> *before* you take that CANCEL out! :-)
>

Yes, but I'm never confident enough to take that CANCEL out, so what I
usually end up doing is writing a separate wrapper routine around the
request and giving that wrapper routine an ERROR keyword. In that
wrapper routine, the CATCH block sets ERROR=1. Then in the original
routine, I can call the wrapper and not have to worry that it will have
a runtime error, I can just check the ERROR keyword.

I just get worried when the logic in the CATCH block starts to get
complicated.

Mike
--
www.michaelgalloy.com
Associate Research Scientist
Tech-X Corporation
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: ENVI_INIT_TILE tiling problem
Next Topic: ENVI_INIT_TILE tiling problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Mon Dec 01 15:44:08 PST 2025

Total time taken to generate the page: 0.24162 seconds