On Sep 26, 2006, at 4:33 PM, Dar Scott wrote:

However, with recent change in the IDE, this is not too bad:

*************
put false into bad
try
   put the defaultFolder into savedDefaultFolder
   set the defaultfolder to defaultFolderForThisTask
   ... blah blah blah ...
catch e
   put true into bad  -- throw is broken here
finally
   set the defaultFolder to savedDefaultFolder
end try
if bad then throw "Error when loading external."
*************

It would be simpler if an error could reliably be thrown in the catch section.

I goofed. I was trying to give an example of what to do to keep from changing defaultFolder so it would be OK when an external is loaded. I worded the 'throw' above as if the external was loaded in the "... blah blah blah ...".

The last line is better like this:

if bad then throw "Error while defaultFolder was changed."

Or whatever is appropriate for the particular situation.

All the more why 'catch' should be optional.

Dar

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to