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

Home » Public Forums » archive » CATCH inside a FOR loop and out?
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 inside a FOR loop and out? [message #88323 is a reply to message #88322] Mon, 14 April 2014 12:30 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gianguido Cianci writes:

> Say I want to catch two kinds of erros:
>
> 1. if error happens inside a for loop I want to deal with it and then continue with i++
> 2. if error happens outside the loop I want to return -1
>
> Can this be done?

You can put as many CATCH error handlers in your code as you like. Only
one is in effect at any one time. (The last one to be executed as you
step through the code.) So, just write another error handler for
NewError.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DLM "unload"?
Next Topic: traces plot outside of x-axis boundaries

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

Current Time: Wed Oct 08 18:15:27 PDT 2025

Total time taken to generate the page: 0.00415 seconds