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

Home » Public Forums » archive » Re: Error Handling Advice
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 Advice [message #82731 is a reply to message #82730] Fri, 11 January 2013 16:03 Go to previous messageGo to previous message
Matthew Argall is currently offline  Matthew Argall
Messages: 286
Registered: October 2011
Senior Member
> 3. The only exception to 2 is for utility functions

What qualifies as a utility function?


> 5. I make sure I check EVERY SINGLE ONE of my parameters and keywords to
> see that they are defined as *something*.

Just to see if they are defined, or do you make sure they are scalars, arrays, have the proper dimensions, etc? Is there a "too overboard"?

> 9. CATCH error handlers are to catch program errors that I know
> inevitably occur, but that I don't anticipate. I check EVERY SINGLE ONE of my
> parameters and I try to anticipate common errors and check for those.
> Sometimes it is embarrassing how much code is error handling code in a
> small program. Don't use CATCH error handlers because you are too lazy
> to do any work.

So, check all anticipated/potential errors, then include a CATCH for the ones you miss. When you discover one you missed, you put in another check. Is that the gist of it?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using function after .reset
Next Topic: Transparent and Overplotted Images with cgImage

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

Current Time: Fri Oct 10 08:34:57 PDT 2025

Total time taken to generate the page: 1.35645 seconds