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

Home » Public Forums » archive » Error Handling Change in IDL 8
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: Error Handling Change in IDL 8 [message #73006 is a reply to message #72910] Tue, 19 October 2010 09:35 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
David Fanning wrote:
> Folks,
>
> This change to ON_ERROR,2 error handling is driving me nuts!!

Sorry, man.

> I've very close to just giving up on IDL 8. I do NOT want
> to re-write the last 10 years of my IDL programs! :-(

Well, not all at once. To quote James Coplien in the foreword to "Clean Code":
<quote>
...the bulk of the work lies not in manufacturing but in maintenance -- or its avoidance. In software, 80% or more of
what we do is quaintly called "maintenance": the act of repair.
</quote>

Granted this is indirect repair, but it is repair nonetheless.

Think of it as fixing your house after a storm blows through, as opposed to fixing your house after you put the ladder
through the living room window (and then proceed to knock over your antique Tiffany lamp from the table....)

In this case ITTVIS is the "Act of God" causing the damage. :o)

> Anyone else having this problem?

No, I use CATCH.

I will offer more than just a sympathetic ear, though.

Can you replace that one line of code
ON_ERROR, 2
in your routines with a CATCH construct that replicates the behaviour you want?

If so (I don't think there should be a difference between functions and procedures in this case, but ?), put that code
in an include file and simply replace all instances of
ON_ERROR, 2
with
@<your catch construct include file>

You can trivially do this replacement with a script (see a previous post of mine about this).

FWIW, if you come up with the include file and create a branch for me in your subversion repository, I can check that
branch out, do the replacements, and commit the changes (I will need write access so I understand if that makes you feel
a bit squirrelly and say no). You can then test the changes in the branch (I can also if you have standard tests for the
code). If you like what you see, we can merge the branch into the trunk. If you don't like it, we can simply delete the
branch.

cheers,

paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL runtime
Next Topic: IDL 8.0 garbage collector issue.

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

Current Time: Tue Dec 02 13:03:22 PST 2025

Total time taken to generate the page: 0.16102 seconds