At 6:50 PM +0100 25/8/1999, Kevin Miller wrote:

>I think it should supress the error, but it doesn't appear to here either.
>But lockErrorDialogs has been superceded with the "try" control structure:
>
>try
>  whatever scripts
>catch someError
>  put "There was an error" && someError
>end try
>
>Also check out the entries for "throw" and "finally".
>

Hi

I'd be interested in some more discussion of error handling strategies.

One thing that's not clear to me is the types of error that are 
"thrown" by Metacard in a try-catch structure. For example, script 
errors are thrown, but file related errors aren't. For this we have 
to check "the result". But what about memory-related errors? Is there 
a list anywhere of the errors that Metacard throws?

Recently, I started using something like the following for 
file-related errors ...

try
   put url someUrl into tVar
   if the result is not empty then throw the result
   --more stuff here
catch pError
   put "There was an error" && pError -- for example
end try

.. but I'd be interested to know how other people handle this kind of thing.

And what is the purpose of the "finally" structure?

Still thirsting for knowledge.
Dave Cragg

Reply via email to